Compare commits
	
		
			8 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					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.")
 | 
			
		||||
        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"
 | 
			
		||||
 
 | 
			
		||||
@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
@@ -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"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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:\\<some folder or path>\\meshagent.exe"</code>
 | 
			
		||||
            <code>-local-mesh "C:\\<some folder or path>\\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:\\<some folder or path>\\ca.pem"</code>
 | 
			
		||||
            <code>-cert "C:\\<some folder or path>\\ca.pem"</code>
 | 
			
		||||
          </q-badge>
 | 
			
		||||
          <span> To use a domain CA </span>
 | 
			
		||||
        </div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user