Revert "Refactor debug"

This commit is contained in:
Dan 2022-06-16 22:14:44 -07:00 committed by GitHub
parent 506c58aded
commit 24d51a30e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 20 additions and 244 deletions

View file

@ -13,10 +13,14 @@ package agent
import (
"log"
"github.com/amidaware/rmmagent/shared"
"github.com/spf13/viper"
)
const (
etcConfig = "/etc/tacticalagent"
)
func (a *Agent) checkExistingAndRemove(silent bool) {}
func (a *Agent) installerMsg(msg, alert string, silent bool) {
@ -38,13 +42,7 @@ func createAgentConfig(baseurl, agentid, apiurl, token, agentpk, cert, proxy, me
viper.Set("proxy", proxy)
viper.Set("meshdir", meshdir)
viper.SetConfigPermissions(0660)
configLocation := "/etc/tacticalagent"
if shared.TEST {
configLocation = "tacticalagent"
}
err := viper.SafeWriteConfigAs(configLocation)
err := viper.SafeWriteConfigAs(etcConfig)
if err != nil {
log.Fatalln("createAgentConfig", err)
}