Merge remote-tracking branch 'upstream/develop' into BigRefactor

This commit is contained in:
redanthrax 2022-06-24 11:22:50 -07:00
commit 29e304fa4e
17 changed files with 71 additions and 88 deletions

View file

@ -19,6 +19,10 @@ import (
"github.com/spf13/viper"
)
const (
etcConfig = "/etc/tacticalagent"
)
func (a *Agent) checkExistingAndRemove(silent bool) {}
func (a *Agent) installerMsg(msg, alert string, silent bool) {
@ -40,10 +44,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"
err := viper.SafeWriteConfigAs(configLocation)
err := viper.SafeWriteConfigAs(etcConfig)
if err != nil {
log.Fatalln("createAgentConfig", err)
}