update installer for new optional agent flags

This commit is contained in:
wh1te909 2020-09-30 06:45:11 +00:00
parent ee2b916898
commit bed6cd2874
2 changed files with 11 additions and 1 deletions

View File

@ -57,6 +57,8 @@ func main() {
debugLog := flag.String("log", "", "Verbose output")
localSalt := flag.String("local-salt", "", "Use local salt minion")
localMesh := flag.String("local-mesh", "", "Use local mesh agent")
cert := flag.String("cert", "", "Path to ca.pem")
timeout := flag.String("timeout", "", "Timeout for subprocess calls")
flag.Parse()
var debug bool = false
@ -87,6 +89,14 @@ func main() {
cmdArgs = append(cmdArgs, "--local-mesh", *localMesh)
}
if len(strings.TrimSpace(*cert)) != 0 {
cmdArgs = append(cmdArgs, "--cert", *cert)
}
if len(strings.TrimSpace(*timeout)) != 0 {
cmdArgs = append(cmdArgs, "--timeout", *timeout)
}
if Rdp == "1" {
cmdArgs = append(cmdArgs, "--rdp")
}

View File

@ -16,7 +16,7 @@ APP_VER = "0.0.64"
# https://github.com/wh1te909/salt
LATEST_SALT_VER = "1.1.0"
LATEST_AGENT_VER = "0.11.1"
LATEST_AGENT_VER = "0.11.2"
DL_64 = f"https://github.com/wh1te909/winagent/releases/download/v{LATEST_AGENT_VER}/winagent-v{LATEST_AGENT_VER}.exe"
DL_32 = f"https://github.com/wh1te909/winagent/releases/download/v{LATEST_AGENT_VER}/winagent-v{LATEST_AGENT_VER}-x86.exe"