mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-07 17:51:56 +08:00
removing peer cache
This commit is contained in:
@@ -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")
|
||||
|
Reference in New Issue
Block a user