mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 01:07:41 +08:00
address code review comments
This commit is contained in:
@@ -24,8 +24,9 @@ func Connect(network string) error {
|
|||||||
if err = wireguard.ApplyConf(&cfg.Node, cfg.Node.Interface, filePath); err != nil {
|
if err = wireguard.ApplyConf(&cfg.Node, cfg.Node.Interface, filePath); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
err = config.ModNodeConfig(&cfg.Node)
|
||||||
daemon.Restart()
|
daemon.Restart()
|
||||||
return config.ModNodeConfig(&cfg.Node)
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disconnect - attempts to disconnect a node on given network
|
// Disconnect - attempts to disconnect a node on given network
|
||||||
@@ -43,6 +44,7 @@ func Disconnect(network string) error {
|
|||||||
if err = wireguard.ApplyConf(&cfg.Node, cfg.Node.Interface, filePath); err != nil {
|
if err = wireguard.ApplyConf(&cfg.Node, cfg.Node.Interface, filePath); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
err = config.ModNodeConfig(&cfg.Node)
|
||||||
daemon.Restart()
|
daemon.Restart()
|
||||||
return config.ModNodeConfig(&cfg.Node)
|
return err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user