add logging

This commit is contained in:
Matthew R. Kasun 2022-02-08 22:55:25 -05:00
parent 84d237f8f6
commit f0a389dfd0
2 changed files with 3 additions and 5 deletions

View file

@ -49,9 +49,6 @@ func Join(cfg config.ClientConfig, privateKey string) error {
return err
}
ncutils.PrintLog("joined "+cfg.Network, 1)
if cfg.Daemon != "off" {
err = daemon.InstallDaemon(cfg)
}
if ncutils.IsWindows() {
ncutils.PrintLog("setting up WireGuard app", 0)
time.Sleep(time.Second >> 1)

View file

@ -3,8 +3,8 @@ package daemon
import (
"fmt"
"log"
"path/filepath"
"os"
"path/filepath"
"github.com/gravitl/netmaker/netclient/ncutils"
)
@ -104,7 +104,8 @@ netclient_args="daemon"`
}
func FreebsdDaemon(command string) {
_, _ = ncutils.RunCmd(fmt.Sprintf("service netclient %s", command), true)
_, err := ncutils.RunCmd(fmt.Sprintf("service netclient %s", command), true)
ncutils.Log("error from RunCmd " + err.Error())
}
func CleanupFreebsd() {