mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-28 01:52:58 +08:00
1 more change
This commit is contained in:
parent
4cfc161dfe
commit
25ea986402
1 changed files with 2 additions and 2 deletions
|
@ -177,12 +177,12 @@ func InitWireguard(node *models.Node, privkey string, peers []wgtypes.PeerConfig
|
|||
ncutils.PrintLog("waiting for interface...", 1) // ensure interface is created
|
||||
output, _ := ncutils.RunCmd("wg", false)
|
||||
starttime := time.Now()
|
||||
ifaceReady := !strings.Contains(output, ifacename)
|
||||
ifaceReady := strings.Contains(output, ifacename)
|
||||
for !ifaceReady && !(time.Now().After(starttime.Add(time.Second << 4))) {
|
||||
output, _ = ncutils.RunCmd("wg", false)
|
||||
err = ApplyConf(node, ifacename, confPath)
|
||||
time.Sleep(time.Second)
|
||||
ifaceReady = !strings.Contains(output, ifacename)
|
||||
ifaceReady = strings.Contains(output, ifacename)
|
||||
}
|
||||
newDevice, devErr := wgclient.Device(deviceiface)
|
||||
if !ifaceReady || devErr != nil {
|
||||
|
|
Loading…
Reference in a new issue