mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-28 19:11:57 +08:00
refactoring mac client
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user