added logic to check peers

This commit is contained in:
0xdcarns
2022-02-02 22:00:59 -05:00
parent e336d62321
commit 284283c130
5 changed files with 39 additions and 122 deletions

View File

@@ -8,7 +8,6 @@ import (
"github.com/gravitl/netmaker/models"
"github.com/gravitl/netmaker/netclient/config"
"github.com/gravitl/netmaker/netclient/local"
"github.com/gravitl/netmaker/netclient/ncutils"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
)
@@ -66,12 +65,9 @@ func ApplyWGQuickConf(confPath string, ifacename string) error {
ncutils.RunCmd("wg-quick down "+confPath, true)
}
_, err = ncutils.RunCmd("wg-quick up "+confPath, true)
if err != nil {
return err
}
if ncutils.IsLinux() {
err = local.ApplyRoutesFromConf(confPath)
}
// if err != nil {
// return err
// }
return err
}
}