diff --git a/agent/agent.go b/agent/agent.go
index c28d945..2fb9fd7 100644
--- a/agent/agent.go
+++ b/agent/agent.go
@@ -76,6 +76,12 @@ const (
winExeName = "tacticalrmm.exe"
winSvcName = "tacticalrmm"
meshSvcName = "mesh agent"
+ etcConfig = "/etc/tacticalagent"
+ nixAgentDir = "/opt/tacticalagent"
+ nixAgentBin = nixAgentDir + "/tacticalagent"
+ macPlistPath = "/Library/LaunchDaemons/tacticalagent.plist"
+ macPlistName = "tacticalagent"
+ macMeshSvcDir = "/usr/local/mesh_services"
)
var winTempDir = filepath.Join(os.Getenv("PROGRAMDATA"), "TacticalRMM")
@@ -120,13 +126,18 @@ func New(logger *logrus.Logger, version string) *Agent {
}
var MeshSysExe string
- if len(ac.CustomMeshDir) > 0 {
- MeshSysExe = filepath.Join(ac.CustomMeshDir, "MeshAgent.exe")
- } else {
- MeshSysExe = filepath.Join(os.Getenv("ProgramFiles"), "Mesh Agent", "MeshAgent.exe")
- }
-
- if runtime.GOOS == "linux" {
+ switch runtime.GOOS {
+ case "windows":
+ if len(ac.CustomMeshDir) > 0 {
+ MeshSysExe = filepath.Join(ac.CustomMeshDir, "MeshAgent.exe")
+ } else {
+ MeshSysExe = filepath.Join(os.Getenv("ProgramFiles"), "Mesh Agent", "MeshAgent.exe")
+ }
+ case "linux":
+ MeshSysExe = "/opt/tacticalmesh/meshagent"
+ case "darwin":
+ MeshSysExe = "/usr/local/mesh_services/meshagent/meshagent"
+ default:
MeshSysExe = "/opt/tacticalmesh/meshagent"
}
diff --git a/agent/agent_unix.go b/agent/agent_unix.go
index 9d23590..f33a307 100644
--- a/agent/agent_unix.go
+++ b/agent/agent_unix.go
@@ -50,7 +50,7 @@ func (a *Agent) GetDisks() []trmm.Disk {
}
for _, p := range partitions {
- if strings.Contains(p.Device, "dev/loop") {
+ if strings.Contains(p.Device, "dev/loop") || strings.Contains(p.Device, "devfs") {
continue
}
usage, err := disk.Usage(p.Mountpoint)
@@ -283,7 +283,7 @@ func (a *Agent) AgentUpdate(url, inno, version string) {
}
}
- if a.seEnforcing() {
+ if runtime.GOOS == "linux" && a.seEnforcing() {
se := a.NewCMDOpts()
se.Command = fmt.Sprintf("restorecon -rv %s", self)
out := a.CmdV2(se)
@@ -292,7 +292,15 @@ func (a *Agent) AgentUpdate(url, inno, version string) {
opts := a.NewCMDOpts()
opts.Detached = true
- opts.Command = "systemctl restart tacticalagent.service"
+ switch runtime.GOOS {
+ case "linux":
+ opts.Command = "systemctl restart tacticalagent.service"
+ case "darwin":
+ opts.Command = "launchctl kickstart -k system/tacticalagent"
+ default:
+ return
+ }
+
a.CmdV2(opts)
}
@@ -310,7 +318,9 @@ func (a *Agent) AgentUninstall(code string) {
opts := a.NewCMDOpts()
opts.IsScript = true
opts.Shell = f.Name()
- opts.Args = []string{"uninstall"}
+ if runtime.GOOS == "linux" {
+ opts.Args = []string{"uninstall"}
+ }
opts.Detached = true
a.CmdV2(opts)
}
@@ -354,7 +364,15 @@ func (a *Agent) getMeshNodeID() (string, error) {
func (a *Agent) RecoverMesh() {
a.Logger.Infoln("Attempting mesh recovery")
opts := a.NewCMDOpts()
- opts.Command = "systemctl restart meshagent.service"
+ def := "systemctl restart meshagent.service"
+ switch runtime.GOOS {
+ case "linux":
+ opts.Command = def
+ case "darwin":
+ opts.Command = "launchctl kickstart -k system/meshagent"
+ default:
+ opts.Command = def
+ }
a.CmdV2(opts)
a.SyncMeshNodeID()
}
@@ -413,18 +431,25 @@ func (a *Agent) GetWMIInfo() map[string]interface{} {
wmiInfo["make_model"] = ""
chassis, err := ghw.Chassis(ghw.WithDisableWarnings())
if err != nil {
- a.Logger.Errorln("ghw.Chassis()", err)
+ a.Logger.Debugln("ghw.Chassis()", err)
} else {
if chassis.Vendor != "" || chassis.Version != "" {
wmiInfo["make_model"] = fmt.Sprintf("%s %s", chassis.Vendor, chassis.Version)
}
}
+ if runtime.GOOS == "darwin" {
+ opts := a.NewCMDOpts()
+ opts.Command = "sysctl hw.model"
+ out := a.CmdV2(opts)
+ wmiInfo["make_model"] = strings.ReplaceAll(out.Stdout, "hw.model: ", "")
+ }
+
// gfx cards
gpu, err := ghw.GPU(ghw.WithDisableWarnings())
if err != nil {
- a.Logger.Errorln("ghw.GPU()", err)
+ a.Logger.Debugln("ghw.GPU()", err)
} else {
for _, i := range gpu.GraphicsCards {
if i.DeviceInfo != nil {
diff --git a/agent/agent_windows.go b/agent/agent_windows.go
index 00e489c..26cb7b6 100644
--- a/agent/agent_windows.go
+++ b/agent/agent_windows.go
@@ -653,18 +653,6 @@ func (a *Agent) AgentUninstall(code string) {
cmd.Start()
}
-func (a *Agent) addDefenderExlusions() {
- code := fmt.Sprintf(`
-Add-MpPreference -ExclusionPath '%s\*'
-Add-MpPreference -ExclusionPath '%s\*'
-Add-MpPreference -ExclusionPath '%s\*'
-`, winTempDir, a.ProgramDir, winMeshDir)
- _, _, _, err := a.RunScript(code, "powershell", []string{}, 20, false)
- if err != nil {
- a.Logger.Debugln(err)
- }
-}
-
// RunMigrations cleans up unused stuff from older agents
func (a *Agent) RunMigrations() {
for _, i := range []string{"nssm.exe", "nssm-x86.exe"} {
diff --git a/agent/install.go b/agent/install.go
index b03518c..1cd45e4 100644
--- a/agent/install.go
+++ b/agent/install.go
@@ -140,34 +140,57 @@ func (a *Agent) Install(i *Installer) {
installerMeshSystemEXE = a.MeshSystemEXE
}
- var meshNodeID string
+ var meshNodeID, meshOutput string
- if runtime.GOOS == "windows" && !i.NoMesh {
- mesh := filepath.Join(a.ProgramDir, a.MeshInstaller)
- if i.LocalMesh == "" {
+ if !i.NoMesh && runtime.GOOS != "linux" {
+ switch runtime.GOOS {
+ case "windows":
+ meshOutput = filepath.Join(a.ProgramDir, a.MeshInstaller)
+ case "darwin":
+ tmp, err := createTmpFile()
+ if err != nil {
+ a.Logger.Fatalln("Failed to create mesh temp file", err)
+ }
+ meshOutput = tmp.Name()
+ os.Chmod(meshOutput, 0755)
+ defer os.Remove(meshOutput)
+ defer os.Remove(meshOutput + ".msh")
+ }
+
+ if runtime.GOOS == "windows" && i.LocalMesh != "" {
+ err := copyFile(i.LocalMesh, meshOutput)
+ if err != nil {
+ a.installerMsg(err.Error(), "error", i.Silent)
+ }
+ } else {
a.Logger.Infoln("Downloading mesh agent...")
payload := map[string]string{"goarch": a.GoArch, "plat": a.Platform}
- r, err := rClient.R().SetBody(payload).SetOutput(mesh).Post(fmt.Sprintf("%s/api/v3/meshexe/", baseURL))
+ r, err := rClient.R().SetBody(payload).SetOutput(meshOutput).Post(fmt.Sprintf("%s/api/v3/meshexe/", baseURL))
if err != nil {
a.installerMsg(fmt.Sprintf("Failed to download mesh agent: %s", err.Error()), "error", i.Silent)
}
if r.StatusCode() != 200 {
a.installerMsg(fmt.Sprintf("Unable to download the mesh agent from the RMM. %s", r.String()), "error", i.Silent)
}
- } else {
- err := copyFile(i.LocalMesh, mesh)
- if err != nil {
- a.installerMsg(err.Error(), "error", i.Silent)
- }
}
a.Logger.Infoln("Installing mesh agent...")
- a.Logger.Debugln("Mesh agent:", mesh)
+ a.Logger.Debugln("Mesh agent:", meshOutput)
time.Sleep(1 * time.Second)
- meshNodeID, err = a.installMesh(mesh, installerMeshSystemEXE, i.Proxy)
- if err != nil {
- a.installerMsg(fmt.Sprintf("Failed to install mesh agent: %s", err.Error()), "error", i.Silent)
+ if runtime.GOOS == "windows" {
+ meshNodeID, err = a.installMesh(meshOutput, installerMeshSystemEXE, i.Proxy)
+ if err != nil {
+ a.installerMsg(fmt.Sprintf("Failed to install mesh agent: %s", err.Error()), "error", i.Silent)
+ }
+ } else {
+ opts := a.NewCMDOpts()
+ opts.Command = fmt.Sprintf("%s -install", meshOutput)
+ out := a.CmdV2(opts)
+ if out.Status.Exit != 0 {
+ a.Logger.Fatalln("Error installing mesh agent:", out.Stderr)
+ }
+ fmt.Println(out.Stdout)
}
}
@@ -219,6 +242,47 @@ func (a *Agent) Install(i *Installer) {
// check in once
a.DoNatsCheckIn()
+ if runtime.GOOS == "darwin" {
+ os.MkdirAll(nixAgentDir, 0755)
+ self, _ := os.Executable()
+ copyFile(self, nixAgentBin)
+ os.Chmod(nixAgentBin, 0755)
+ svc := fmt.Sprintf(`
+
+
+
+
+ Label
+ %s
+
+ ServiceDescription
+ TacticalAgent Service
+
+ ProgramArguments
+
+ %s
+ -m
+ svc
+
+
+ WorkingDirectory
+ %s/
+
+ RunAtLoad
+
+
+ KeepAlive
+
+
+
+`, macPlistName, nixAgentBin, nixAgentDir)
+
+ os.WriteFile(macPlistPath, []byte(svc), 0644)
+ opts := a.NewCMDOpts()
+ opts.Command = fmt.Sprintf("launchctl bootstrap system %s", macPlistPath)
+ a.CmdV2(opts)
+ }
+
if runtime.GOOS == "windows" {
// send software api
a.SendSoftware()
@@ -245,9 +309,6 @@ func (a *Agent) Install(i *Installer) {
a.installerMsg(out.ErrorMsg, "error", i.Silent)
}
- a.Logger.Infoln("Adding windows defender exclusions")
- a.addDefenderExlusions()
-
if i.Power {
a.Logger.Infoln("Disabling sleep/hibernate...")
DisableSleepHibernate()
diff --git a/agent/install_unix.go b/agent/install_unix.go
index cf6a068..56f5f8f 100644
--- a/agent/install_unix.go
+++ b/agent/install_unix.go
@@ -15,17 +15,16 @@ https://license.tacticalrmm.com
package agent
import (
+ "fmt"
"log"
+ "os"
+ "runtime"
+ "time"
"github.com/spf13/viper"
+ trmm "github.com/wh1te909/trmm-shared"
)
-const (
- etcConfig = "/etc/tacticalagent"
-)
-
-func (a *Agent) checkExistingAndRemove(silent bool) {}
-
func (a *Agent) installerMsg(msg, alert string, silent bool) {
if alert == "error" {
a.Logger.Fatalln(msg)
@@ -51,7 +50,30 @@ func createAgentConfig(baseurl, agentid, apiurl, token, agentpk, cert, proxy, me
}
}
-func (a *Agent) addDefenderExlusions() {}
+func (a *Agent) checkExistingAndRemove(silent bool) {
+ if runtime.GOOS == "darwin" {
+ if trmm.FileExists(a.MeshSystemEXE) {
+ a.Logger.Infoln("Existing meshagent found, attempting to remove...")
+ uopts := a.NewCMDOpts()
+ uopts.Command = fmt.Sprintf("%s -fulluninstall", a.MeshSystemEXE)
+ uout := a.CmdV2(uopts)
+ fmt.Println(uout.Stdout)
+ time.Sleep(1 * time.Second)
+ }
+
+ if trmm.FileExists(macPlistPath) {
+ a.Logger.Infoln("Existing tacticalagent plist found, attempting to remove...")
+ opts := a.NewCMDOpts()
+ opts.Command = fmt.Sprintf("launchctl bootout system %s", macPlistPath)
+ a.CmdV2(opts)
+ }
+
+ os.RemoveAll(macMeshSvcDir)
+ os.Remove(etcConfig)
+ os.RemoveAll(nixAgentDir)
+ os.Remove(macPlistPath)
+ }
+}
func DisableSleepHibernate() {}
diff --git a/agent/svc.go b/agent/svc.go
index 4ca85c2..e695ffd 100644
--- a/agent/svc.go
+++ b/agent/svc.go
@@ -12,6 +12,7 @@ https://license.tacticalrmm.com
package agent
import (
+ "runtime"
"sync"
"time"
@@ -27,11 +28,13 @@ func (a *Agent) RunAsService() {
}
func (a *Agent) AgentSvc() {
- go a.GetPython(false)
+ if runtime.GOOS == "windows" {
+ go a.GetPython(false)
- err := createWinTempDir()
- if err != nil {
- a.Logger.Errorln("AgentSvc() createWinTempDir():", err)
+ err := createWinTempDir()
+ if err != nil {
+ a.Logger.Errorln("AgentSvc() createWinTempDir():", err)
+ }
}
a.RunMigrations()
@@ -53,8 +56,10 @@ func (a *Agent) AgentSvc() {
go a.SyncMeshNodeID()
time.Sleep(time.Duration(randRange(1, 3)) * time.Second)
- a.AgentStartup()
- a.SendSoftware()
+ if runtime.GOOS == "windows" {
+ a.AgentStartup()
+ a.SendSoftware()
+ }
checkInHelloTicker := time.NewTicker(time.Duration(randRange(30, 60)) * time.Second)
checkInAgentInfoTicker := time.NewTicker(time.Duration(randRange(200, 400)) * time.Second)
diff --git a/build/rmm.exe.manifest b/build/rmm.exe.manifest
index 14c032d..2053207 100644
--- a/build/rmm.exe.manifest
+++ b/build/rmm.exe.manifest
@@ -3,7 +3,7 @@
diff --git a/build/setup.iss b/build/setup.iss
index bc559ac..03671e2 100644
--- a/build/setup.iss
+++ b/build/setup.iss
@@ -1,5 +1,5 @@
#define MyAppName "Tactical RMM Agent"
-#define MyAppVersion "2.3.1"
+#define MyAppVersion "2.4.0"
#define MyAppPublisher "AmidaWare LLC"
#define MyAppURL "https://github.com/amidaware"
#define MyAppExeName "tacticalrmm.exe"
diff --git a/go.mod b/go.mod
index 0c5f760..db11b33 100644
--- a/go.mod
+++ b/go.mod
@@ -10,8 +10,8 @@ require (
github.com/go-resty/resty/v2 v2.7.0
github.com/gonutz/w32/v2 v2.4.0
github.com/iamacarpet/go-win64api v0.0.0-20220531131246-e84054eb584d
- github.com/nats-io/nats-server/v2 v2.9.0 // indirect
- github.com/nats-io/nats.go v1.16.1-0.20220906180156-a1017eec10b0
+ github.com/nats-io/nats-server/v2 v2.9.1 // indirect
+ github.com/nats-io/nats.go v1.17.0
github.com/rickb777/date v1.19.1
github.com/shirou/gopsutil/v3 v3.22.8
github.com/sirupsen/logrus v1.9.0
@@ -19,7 +19,7 @@ require (
github.com/wh1te909/go-win64api v0.0.0-20210906074314-ab23795a6ae5
github.com/wh1te909/trmm-shared v0.0.0-20220227075846-f9f757361139
golang.org/x/net v0.0.0-20220706163947-c90051bbdb60 // indirect
- golang.org/x/sys v0.0.0-20220906135438-9e1f76180b77
+ golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8
)
require (
@@ -67,7 +67,7 @@ require (
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.5.0 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
- golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
+ golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0 // indirect
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
diff --git a/go.sum b/go.sum
index 96c88a6..0b46d51 100644
--- a/go.sum
+++ b/go.sum
@@ -191,7 +191,7 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X
github.com/kardianos/service v1.2.1 h1:AYndMsehS+ywIS6RB9KOlcXzteWUzxgMgBymJD7+BYk=
github.com/kardianos/service v1.2.1/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY=
+github.com/klauspost/compress v1.15.10 h1:Ai8UzuomSCDw90e1qNMtb15msBXsNpH6gzkkENQNcJo=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
@@ -211,10 +211,10 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/nats-io/jwt/v2 v2.3.0 h1:z2mA1a7tIf5ShggOFlR1oBPgd6hGqcDYsISxZByUzdI=
-github.com/nats-io/nats-server/v2 v2.9.0 h1:DLWu+7/VgGOoChcDKytnUZPAmudpv7o/MhKmNrnH1RE=
-github.com/nats-io/nats-server/v2 v2.9.0/go.mod h1:BWKY6217RvhI+FDoOLZ2BH+hOC37xeKRBlQ1Lz7teKI=
-github.com/nats-io/nats.go v1.16.1-0.20220906180156-a1017eec10b0 h1:dPUKD6Iv8M1y9MU8PK6H4a4/12yx5/CbaYWz/Z1arY8=
-github.com/nats-io/nats.go v1.16.1-0.20220906180156-a1017eec10b0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w=
+github.com/nats-io/nats-server/v2 v2.9.1 h1:JaP6NpCVmSu0AXgbnOkGtJovOxuf8mjNjlX3H+tSpyI=
+github.com/nats-io/nats-server/v2 v2.9.1/go.mod h1:T5AEyzrnDGaseK/Y0G6e2IA5tLrHyjLOeGUALq+A8XE=
+github.com/nats-io/nats.go v1.17.0 h1:1jp5BThsdGlN91hW0k3YEfJbfACjiOYtUiLXG0RL4IE=
+github.com/nats-io/nats.go v1.17.0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w=
github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8=
github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
@@ -316,8 +316,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM=
-golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0 h1:a5Yg6ylndHHYJqIPrdq0AhvR6KTvDTAvgBtaidhEevY=
+golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -468,8 +468,8 @@ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220906135438-9e1f76180b77 h1:C1tElbkWrsSkn3IRl1GCW/gETw1TywWIPgwZtXTZbYg=
-golang.org/x/sys v0.0.0-20220906135438-9e1f76180b77/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 h1:h+EGohizhe9XlX18rfpa8k8RAc5XyaeamM+0VHRd4lc=
+golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -483,7 +483,7 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ=
+golang.org/x/time v0.0.0-20220920022843-2ce7c2934d45 h1:yuLAip3bfURHClMG9VBdzPrQvCWjWiWUTBGV+/fCbUs=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
diff --git a/main.go b/main.go
index d629a4d..21fa89f 100644
--- a/main.go
+++ b/main.go
@@ -25,7 +25,7 @@ import (
)
var (
- version = "2.3.1"
+ version = "2.4.0"
log = logrus.New()
logFile *os.File
)
@@ -185,7 +185,7 @@ func setupLogging(level, to *string) {
switch runtime.GOOS {
case "windows":
logFile, _ = os.OpenFile(filepath.Join(os.Getenv("ProgramFiles"), "TacticalAgent", "agent.log"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0664)
- case "linux":
+ default:
logFile, _ = os.OpenFile(filepath.Join("/var/log/", "tacticalagent.log"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0664)
}
log.SetOutput(logFile)
diff --git a/versioninfo.json b/versioninfo.json
index 0f64bcc..b985ad4 100644
--- a/versioninfo.json
+++ b/versioninfo.json
@@ -2,14 +2,14 @@
"FixedFileInfo": {
"FileVersion": {
"Major": 2,
- "Minor": 3,
- "Patch": 1,
+ "Minor": 4,
+ "Patch": 0,
"Build": 0
},
"ProductVersion": {
"Major": 2,
- "Minor": 3,
- "Patch": 1,
+ "Minor": 4,
+ "Patch": 0,
"Build": 0
},
"FileFlagsMask": "3f",
@@ -22,14 +22,14 @@
"Comments": "",
"CompanyName": "AmidaWare LLC",
"FileDescription": "Tactical RMM Agent",
- "FileVersion": "v2.3.1.0",
+ "FileVersion": "v2.4.0.0",
"InternalName": "tacticalrmm.exe",
"LegalCopyright": "Copyright (c) 2022 AmidaWare LLC",
"LegalTrademarks": "",
"OriginalFilename": "tacticalrmm.exe",
"PrivateBuild": "",
"ProductName": "Tactical RMM Agent",
- "ProductVersion": "v2.3.1.0",
+ "ProductVersion": "v2.4.0.0",
"SpecialBuild": ""
},
"VarFileInfo": {