Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
763877541a | ||
|
|
1fad7d72a2 | ||
|
|
51ea2ea879 | ||
|
|
d77a478bf0 | ||
|
|
e413c0264a | ||
|
|
f88e7f898c | ||
|
|
d07bd4a6db | ||
|
|
fb34c099d5 | ||
|
|
1d2ee56a15 | ||
|
|
86665f7f09 |
@@ -23,6 +23,22 @@ def agent_update(pk: int) -> str:
|
|||||||
logger.warning(f"Unable to determine arch on {agent.hostname}. Skipping.")
|
logger.warning(f"Unable to determine arch on {agent.hostname}. Skipping.")
|
||||||
return "noarch"
|
return "noarch"
|
||||||
|
|
||||||
|
# force an update to 1.1.5 since 1.1.6 needs agent to be on 1.1.5 first
|
||||||
|
if pyver.parse(agent.version) < pyver.parse("1.1.5"):
|
||||||
|
version = "1.1.5"
|
||||||
|
if agent.arch == "64":
|
||||||
|
url = "https://github.com/wh1te909/rmmagent/releases/download/v1.1.5/winagent-v1.1.5.exe"
|
||||||
|
inno = "winagent-v1.1.5.exe"
|
||||||
|
elif agent.arch == "32":
|
||||||
|
url = "https://github.com/wh1te909/rmmagent/releases/download/v1.1.5/winagent-v1.1.5-x86.exe"
|
||||||
|
inno = "winagent-v1.1.5-x86.exe"
|
||||||
|
else:
|
||||||
|
return "nover"
|
||||||
|
else:
|
||||||
|
version = settings.LATEST_AGENT_VER
|
||||||
|
url = agent.winagent_dl
|
||||||
|
inno = agent.win_inno_exe
|
||||||
|
|
||||||
if agent.has_nats:
|
if agent.has_nats:
|
||||||
if agent.pendingactions.filter(
|
if agent.pendingactions.filter(
|
||||||
action_type="agentupdate", status="pending"
|
action_type="agentupdate", status="pending"
|
||||||
@@ -30,9 +46,7 @@ def agent_update(pk: int) -> str:
|
|||||||
action = agent.pendingactions.filter(
|
action = agent.pendingactions.filter(
|
||||||
action_type="agentupdate", status="pending"
|
action_type="agentupdate", status="pending"
|
||||||
).last()
|
).last()
|
||||||
if pyver.parse(action.details["version"]) < pyver.parse(
|
if pyver.parse(action.details["version"]) < pyver.parse(version):
|
||||||
settings.LATEST_AGENT_VER
|
|
||||||
):
|
|
||||||
action.delete()
|
action.delete()
|
||||||
else:
|
else:
|
||||||
return "pending"
|
return "pending"
|
||||||
@@ -41,9 +55,9 @@ def agent_update(pk: int) -> str:
|
|||||||
agent=agent,
|
agent=agent,
|
||||||
action_type="agentupdate",
|
action_type="agentupdate",
|
||||||
details={
|
details={
|
||||||
"url": agent.winagent_dl,
|
"url": url,
|
||||||
"version": settings.LATEST_AGENT_VER,
|
"version": version,
|
||||||
"inno": agent.win_inno_exe,
|
"inno": inno,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
return "created"
|
return "created"
|
||||||
@@ -53,8 +67,8 @@ def agent_update(pk: int) -> str:
|
|||||||
agent.salt_api_async(
|
agent.salt_api_async(
|
||||||
func="win_agent.do_agent_update_v2",
|
func="win_agent.do_agent_update_v2",
|
||||||
kwargs={
|
kwargs={
|
||||||
"inno": agent.win_inno_exe,
|
"inno": inno,
|
||||||
"url": agent.winagent_dl,
|
"url": url,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
return "salt"
|
return "salt"
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ func main() {
|
|||||||
debugLog := flag.String("log", "", "Verbose output")
|
debugLog := flag.String("log", "", "Verbose output")
|
||||||
localMesh := flag.String("local-mesh", "", "Use local mesh agent")
|
localMesh := flag.String("local-mesh", "", "Use local mesh agent")
|
||||||
noSalt := flag.Bool("nosalt", false, "Does not install salt")
|
noSalt := flag.Bool("nosalt", false, "Does not install salt")
|
||||||
|
silent := flag.Bool("silent", false, "Do not popup any message boxes during installation")
|
||||||
cert := flag.String("cert", "", "Path to ca.pem")
|
cert := flag.String("cert", "", "Path to ca.pem")
|
||||||
timeout := flag.String("timeout", "", "Timeout for subprocess calls")
|
timeout := flag.String("timeout", "", "Timeout for subprocess calls")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
@@ -78,7 +79,11 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if debug {
|
if debug {
|
||||||
cmdArgs = append(cmdArgs, "--log", "DEBUG")
|
cmdArgs = append(cmdArgs, "-log", "debug")
|
||||||
|
}
|
||||||
|
|
||||||
|
if *silent {
|
||||||
|
cmdArgs = append(cmdArgs, "-silent")
|
||||||
}
|
}
|
||||||
|
|
||||||
if *noSalt {
|
if *noSalt {
|
||||||
@@ -86,27 +91,27 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(strings.TrimSpace(*localMesh)) != 0 {
|
if len(strings.TrimSpace(*localMesh)) != 0 {
|
||||||
cmdArgs = append(cmdArgs, "--local-mesh", *localMesh)
|
cmdArgs = append(cmdArgs, "-local-mesh", *localMesh)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(strings.TrimSpace(*cert)) != 0 {
|
if len(strings.TrimSpace(*cert)) != 0 {
|
||||||
cmdArgs = append(cmdArgs, "--cert", *cert)
|
cmdArgs = append(cmdArgs, "-cert", *cert)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(strings.TrimSpace(*timeout)) != 0 {
|
if len(strings.TrimSpace(*timeout)) != 0 {
|
||||||
cmdArgs = append(cmdArgs, "--timeout", *timeout)
|
cmdArgs = append(cmdArgs, "-timeout", *timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
if Rdp == "1" {
|
if Rdp == "1" {
|
||||||
cmdArgs = append(cmdArgs, "--rdp")
|
cmdArgs = append(cmdArgs, "-rdp")
|
||||||
}
|
}
|
||||||
|
|
||||||
if Ping == "1" {
|
if Ping == "1" {
|
||||||
cmdArgs = append(cmdArgs, "--ping")
|
cmdArgs = append(cmdArgs, "-ping")
|
||||||
}
|
}
|
||||||
|
|
||||||
if Power == "1" {
|
if Power == "1" {
|
||||||
cmdArgs = append(cmdArgs, "--power")
|
cmdArgs = append(cmdArgs, "-power")
|
||||||
}
|
}
|
||||||
|
|
||||||
if debug {
|
if debug {
|
||||||
|
|||||||
@@ -15,17 +15,17 @@ EXE_DIR = os.path.join(BASE_DIR, "tacticalrmm/private/exe")
|
|||||||
AUTH_USER_MODEL = "accounts.User"
|
AUTH_USER_MODEL = "accounts.User"
|
||||||
|
|
||||||
# latest release
|
# latest release
|
||||||
TRMM_VERSION = "0.2.10"
|
TRMM_VERSION = "0.2.14"
|
||||||
|
|
||||||
# bump this version everytime vue code is changed
|
# bump this version everytime vue code is changed
|
||||||
# to alert user they need to manually refresh their browser
|
# to alert user they need to manually refresh their browser
|
||||||
APP_VER = "0.0.98"
|
APP_VER = "0.0.99"
|
||||||
|
|
||||||
# https://github.com/wh1te909/salt
|
# https://github.com/wh1te909/salt
|
||||||
LATEST_SALT_VER = "1.1.0"
|
LATEST_SALT_VER = "1.1.0"
|
||||||
|
|
||||||
# https://github.com/wh1te909/rmmagent
|
# https://github.com/wh1te909/rmmagent
|
||||||
LATEST_AGENT_VER = "1.1.5"
|
LATEST_AGENT_VER = "1.1.9"
|
||||||
|
|
||||||
MESH_VER = "0.7.14"
|
MESH_VER = "0.7.14"
|
||||||
|
|
||||||
|
|||||||
@@ -26,19 +26,25 @@
|
|||||||
>
|
>
|
||||||
<div class="q-pa-xs q-gutter-xs">
|
<div class="q-pa-xs q-gutter-xs">
|
||||||
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
||||||
<code>--log DEBUG</code>
|
<code>-log debug</code>
|
||||||
</q-badge>
|
</q-badge>
|
||||||
<span>To enable verbose output during the install</span>
|
<span>To enable verbose output during the install</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-pa-xs q-gutter-xs">
|
<div class="q-pa-xs q-gutter-xs">
|
||||||
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
||||||
<code>--nosalt</code>
|
<code>-silent</code>
|
||||||
|
</q-badge>
|
||||||
|
<span>Do not popup any message boxes during install</span>
|
||||||
|
</div>
|
||||||
|
<div class="q-pa-xs q-gutter-xs">
|
||||||
|
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
||||||
|
<code>-nosalt</code>
|
||||||
</q-badge>
|
</q-badge>
|
||||||
<span> Do not install salt during agent install. </span>
|
<span> Do not install salt during agent install. </span>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-pa-xs q-gutter-xs">
|
<div class="q-pa-xs q-gutter-xs">
|
||||||
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
||||||
<code>--local-mesh "C:\\<some folder or path>\\meshagent.exe"</code>
|
<code>-local-mesh "C:\\<some folder or path>\\meshagent.exe"</code>
|
||||||
</q-badge>
|
</q-badge>
|
||||||
<span>
|
<span>
|
||||||
To skip downloading the Mesh Agent during the install. Download it
|
To skip downloading the Mesh Agent during the install. Download it
|
||||||
@@ -49,7 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="q-pa-xs q-gutter-xs">
|
<div class="q-pa-xs q-gutter-xs">
|
||||||
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
||||||
<code>--cert "C:\\<some folder or path>\\ca.pem"</code>
|
<code>-cert "C:\\<some folder or path>\\ca.pem"</code>
|
||||||
</q-badge>
|
</q-badge>
|
||||||
<span> To use a domain CA </span>
|
<span> To use a domain CA </span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user