removing peer cache

This commit is contained in:
afeiszli
2022-02-02 00:02:36 -05:00
parent 7c4e8b2b4a
commit 03a30b6bbc
7 changed files with 54 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ import (
"log"
"os"
"path/filepath"
"time"
"github.com/gravitl/netmaker/netclient/ncutils"
)
@@ -54,6 +55,12 @@ func CleanupMac() {
os.Remove(EXEC_DIR + "netclient")
}
func RestartLaunchD() {
ncutils.RunCmd("launchctl unload /Library/LaunchDaemons/"+MAC_SERVICE_NAME+".plist", true)
time.Sleep(time.Second >> 2)
ncutils.RunCmd("launchctl load /Library/LaunchDaemons/"+MAC_SERVICE_NAME+".plist", true)
}
// CreateMacService - Creates the mac service file for LaunchDaemons
func CreateMacService(servicename string, interval string) error {
_, err := os.Stat("/Library/LaunchDaemons")