fixes and updates from merge for windows
This commit is contained in:
parent
fd29dc04e3
commit
cb250104fe
3 changed files with 9 additions and 9 deletions
|
|
@ -801,7 +801,7 @@ func (a *Agent) RecoverMesh() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *Agent) getMeshNodeID() (string, error) {
|
func (a *Agent) getMeshNodeID() (string, error) {
|
||||||
out, err := CMD(a.MeshSystemEXE, []string{"-nodeid"}, 10, false)
|
out, err := CMD(a.MeshSystemBin, []string{"-nodeid"}, 10, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
a.Logger.Debugln(err)
|
a.Logger.Debugln(err)
|
||||||
return "", err
|
return "", err
|
||||||
|
|
@ -843,11 +843,6 @@ func (a *Agent) InstallService() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
s, err := service.New(a, a.ServiceConfig)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
svc, err := service.New(a, a.ServiceConfig)
|
svc, err := service.New(a, a.ServiceConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,17 @@ package agent
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"regexp"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-resty/resty/v2"
|
||||||
"github.com/gonutz/w32/v2"
|
"github.com/gonutz/w32/v2"
|
||||||
|
trmm "github.com/wh1te909/trmm-shared"
|
||||||
"golang.org/x/sys/windows/registry"
|
"golang.org/x/sys/windows/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -204,7 +211,7 @@ func (a *Agent) Install(i *Installer) {
|
||||||
a.PatchMgmnt(true)
|
a.PatchMgmnt(true)
|
||||||
|
|
||||||
a.Logger.Infoln("Installing service...")
|
a.Logger.Infoln("Installing service...")
|
||||||
err := a.InstallService()
|
err = a.InstallService()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
a.installerMsg(err.Error(), "error", i.Silent)
|
a.installerMsg(err.Error(), "error", i.Silent)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ import (
|
||||||
"github.com/amidaware/rmmagent/agent/tactical/shared"
|
"github.com/amidaware/rmmagent/agent/tactical/shared"
|
||||||
"github.com/amidaware/rmmagent/agent/tasks"
|
"github.com/amidaware/rmmagent/agent/tasks"
|
||||||
"github.com/amidaware/rmmagent/agent/utils"
|
"github.com/amidaware/rmmagent/agent/utils"
|
||||||
rmm "github.com/amidaware/rmmagent/shared"
|
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
"github.com/gonutz/w32/v2"
|
"github.com/gonutz/w32/v2"
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
|
|
@ -57,7 +56,6 @@ func AgentUpdate(url string, inno string) {
|
||||||
rClient := resty.New()
|
rClient := resty.New()
|
||||||
rClient.SetCloseConnection(true)
|
rClient.SetCloseConnection(true)
|
||||||
rClient.SetTimeout(15 * time.Minute)
|
rClient.SetTimeout(15 * time.Minute)
|
||||||
rClient.SetDebug(rmm.DEBUG)
|
|
||||||
if len(config.Proxy) > 0 {
|
if len(config.Proxy) > 0 {
|
||||||
rClient.SetProxy(config.Proxy)
|
rClient.SetProxy(config.Proxy)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue