Compare commits

...

8 Commits

Author SHA1 Message Date
wh1te909
51ea2ea879 Release 0.2.13 2020-12-11 20:48:11 +00:00
wh1te909
d77a478bf0 agent 1.1.8 2020-12-11 20:47:54 +00:00
wh1te909
e413c0264a Release 0.2.12 2020-12-11 07:28:27 +00:00
wh1te909
f88e7f898c bump versions 2020-12-11 07:27:42 +00:00
wh1te909
d07bd4a6db add optional silent flag to installer 2020-12-11 07:25:42 +00:00
wh1te909
fb34c099d5 Release 0.2.11 2020-12-10 19:13:24 +00:00
wh1te909
1d2ee56a15 bump versions 2020-12-10 19:12:30 +00:00
wh1te909
86665f7f09 change update task for agent 1.1.6 2020-12-10 19:08:29 +00:00
4 changed files with 47 additions and 22 deletions

View File

@@ -23,6 +23,22 @@ def agent_update(pk: int) -> str:
logger.warning(f"Unable to determine arch on {agent.hostname}. Skipping.")
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.pendingactions.filter(
action_type="agentupdate", status="pending"
@@ -30,9 +46,7 @@ def agent_update(pk: int) -> str:
action = agent.pendingactions.filter(
action_type="agentupdate", status="pending"
).last()
if pyver.parse(action.details["version"]) < pyver.parse(
settings.LATEST_AGENT_VER
):
if pyver.parse(action.details["version"]) < pyver.parse(version):
action.delete()
else:
return "pending"
@@ -41,9 +55,9 @@ def agent_update(pk: int) -> str:
agent=agent,
action_type="agentupdate",
details={
"url": agent.winagent_dl,
"version": settings.LATEST_AGENT_VER,
"inno": agent.win_inno_exe,
"url": url,
"version": version,
"inno": inno,
},
)
return "created"
@@ -53,8 +67,8 @@ def agent_update(pk: int) -> str:
agent.salt_api_async(
func="win_agent.do_agent_update_v2",
kwargs={
"inno": agent.win_inno_exe,
"url": agent.winagent_dl,
"inno": inno,
"url": url,
},
)
return "salt"

View File

@@ -58,6 +58,7 @@ func main() {
debugLog := flag.String("log", "", "Verbose output")
localMesh := flag.String("local-mesh", "", "Use local mesh agent")
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")
timeout := flag.String("timeout", "", "Timeout for subprocess calls")
flag.Parse()
@@ -78,7 +79,11 @@ func main() {
}
if debug {
cmdArgs = append(cmdArgs, "--log", "DEBUG")
cmdArgs = append(cmdArgs, "-log", "debug")
}
if *silent {
cmdArgs = append(cmdArgs, "-silent")
}
if *noSalt {
@@ -86,27 +91,27 @@ func main() {
}
if len(strings.TrimSpace(*localMesh)) != 0 {
cmdArgs = append(cmdArgs, "--local-mesh", *localMesh)
cmdArgs = append(cmdArgs, "-local-mesh", *localMesh)
}
if len(strings.TrimSpace(*cert)) != 0 {
cmdArgs = append(cmdArgs, "--cert", *cert)
cmdArgs = append(cmdArgs, "-cert", *cert)
}
if len(strings.TrimSpace(*timeout)) != 0 {
cmdArgs = append(cmdArgs, "--timeout", *timeout)
cmdArgs = append(cmdArgs, "-timeout", *timeout)
}
if Rdp == "1" {
cmdArgs = append(cmdArgs, "--rdp")
cmdArgs = append(cmdArgs, "-rdp")
}
if Ping == "1" {
cmdArgs = append(cmdArgs, "--ping")
cmdArgs = append(cmdArgs, "-ping")
}
if Power == "1" {
cmdArgs = append(cmdArgs, "--power")
cmdArgs = append(cmdArgs, "-power")
}
if debug {

View File

@@ -15,17 +15,17 @@ EXE_DIR = os.path.join(BASE_DIR, "tacticalrmm/private/exe")
AUTH_USER_MODEL = "accounts.User"
# latest release
TRMM_VERSION = "0.2.10"
TRMM_VERSION = "0.2.13"
# bump this version everytime vue code is changed
# 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
LATEST_SALT_VER = "1.1.0"
# https://github.com/wh1te909/rmmagent
LATEST_AGENT_VER = "1.1.5"
LATEST_AGENT_VER = "1.1.8"
MESH_VER = "0.7.14"

View File

@@ -26,19 +26,25 @@
>
<div class="q-pa-xs q-gutter-xs">
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
<code>--log DEBUG</code>
<code>-log debug</code>
</q-badge>
<span>To enable verbose output during the 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>
<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>
<span> Do not install salt during agent 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>--local-mesh "C:\\&lt;some folder or path&gt;\\meshagent.exe"</code>
<code>-local-mesh "C:\\&lt;some folder or path&gt;\\meshagent.exe"</code>
</q-badge>
<span>
To skip downloading the Mesh Agent during the install. Download it
@@ -49,7 +55,7 @@
</div>
<div class="q-pa-xs q-gutter-xs">
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
<code>--cert "C:\\&lt;some folder or path&gt;\\ca.pem"</code>
<code>-cert "C:\\&lt;some folder or path&gt;\\ca.pem"</code>
</q-badge>
<span> To use a domain CA </span>
</div>