refactoring mac client

This commit is contained in:
afeiszli
2022-10-07 11:46:13 -04:00
parent e0964fccfe
commit e4eb3cf043
3 changed files with 4 additions and 261 deletions

View File

@@ -5,7 +5,6 @@ import (
"os"
"github.com/gravitl/netmaker/logger"
"github.com/gravitl/netmaker/models"
"github.com/gravitl/netmaker/netclient/ncutils"
)
@@ -31,17 +30,6 @@ func ApplyWGQuickConf(confPath, ifacename string, isConnected bool) error {
}
}
// ApplyMacOSConf - applies system commands similar to wg-quick using golang for MacOS
func ApplyMacOSConf(node *models.Node, ifacename, confPath string, isConnected bool) error {
var err error
_ = WgQuickDownMac(node, ifacename)
if !isConnected {
return nil
}
err = WgQuickUpMac(node, ifacename, confPath)
return err
}
// RemoveWGQuickConf - calls wg-quick down
func RemoveWGQuickConf(confPath string, printlog bool) error {
_, err := ncutils.RunCmd(fmt.Sprintf("wg-quick down %s", confPath), printlog)