fixes and updates from merge for windows

This commit is contained in:
redanthrax 2022-06-27 14:12:07 -07:00
parent fd29dc04e3
commit cb250104fe
3 changed files with 9 additions and 9 deletions

View file

@ -801,7 +801,7 @@ func (a *Agent) RecoverMesh() {
}
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 {
a.Logger.Debugln(err)
return "", err
@ -843,11 +843,6 @@ func (a *Agent) InstallService() error {
return nil
}
s, err := service.New(a, a.ServiceConfig)
if err != nil {
return err
}
svc, err := service.New(a, a.ServiceConfig)
if err != nil {
return err

View file

@ -14,10 +14,17 @@ package agent
import (
"fmt"
"log"
"net/url"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"
"github.com/go-resty/resty/v2"
"github.com/gonutz/w32/v2"
trmm "github.com/wh1te909/trmm-shared"
"golang.org/x/sys/windows/registry"
)
@ -204,7 +211,7 @@ func (a *Agent) Install(i *Installer) {
a.PatchMgmnt(true)
a.Logger.Infoln("Installing service...")
err := a.InstallService()
err = a.InstallService()
if err != nil {
a.installerMsg(err.Error(), "error", i.Silent)
}

View file

@ -16,7 +16,6 @@ import (
"github.com/amidaware/rmmagent/agent/tactical/shared"
"github.com/amidaware/rmmagent/agent/tasks"
"github.com/amidaware/rmmagent/agent/utils"
rmm "github.com/amidaware/rmmagent/shared"
"github.com/go-resty/resty/v2"
"github.com/gonutz/w32/v2"
"golang.org/x/sys/windows"
@ -57,7 +56,6 @@ func AgentUpdate(url string, inno string) {
rClient := resty.New()
rClient.SetCloseConnection(true)
rClient.SetTimeout(15 * time.Minute)
rClient.SetDebug(rmm.DEBUG)
if len(config.Proxy) > 0 {
rClient.SetProxy(config.Proxy)
}