소스 검색

removing peer cache

afeiszli 3 년 전
부모
커밋
918e6a5e01
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      netclient/daemon/systemd.go

+ 4 - 1
netclient/daemon/systemd.go

@@ -6,6 +6,7 @@ import (
 	"log"
 	"os"
 	"path/filepath"
+	"time"
 
 	"github.com/gravitl/netmaker/netclient/ncutils"
 )
@@ -74,7 +75,9 @@ WantedBy=multi-user.target
 }
 
 func RestartSystemD() {
-	_, _ = ncutils.RunCmd("systemctl start netclient.service", true)
+	ncutils.PrintLog("restarting netclient.service", 1)
+	time.Sleep(time.Second)
+	_, _ = ncutils.RunCmd("systemctl restart netclient.service", true)
 }
 
 func CleanupLinux() {