|
@@ -106,6 +106,7 @@ func NodeUpdate(client mqtt.Client, msg mqtt.Message) {
|
|
file := ncutils.GetNetclientPathSpecific() + nodeCfg.Node.Interface + ".conf"
|
|
file := ncutils.GetNetclientPathSpecific() + nodeCfg.Node.Interface + ".conf"
|
|
|
|
|
|
if ifaceDelta { // if a change caused an ifacedelta we need to notify the server to update the peers
|
|
if ifaceDelta { // if a change caused an ifacedelta we need to notify the server to update the peers
|
|
|
|
+<<<<<<< HEAD
|
|
if newNode.ListenPort != nodeCfg.Node.LocalListenPort {
|
|
if newNode.ListenPort != nodeCfg.Node.LocalListenPort {
|
|
if err := wireguard.RemoveConf(newNode.Interface, false); err != nil {
|
|
if err := wireguard.RemoveConf(newNode.Interface, false); err != nil {
|
|
logger.Log(0, "error remove interface", newNode.Interface, err.Error())
|
|
logger.Log(0, "error remove interface", newNode.Interface, err.Error())
|
|
@@ -124,6 +125,13 @@ func NodeUpdate(client mqtt.Client, msg mqtt.Message) {
|
|
if keepaliveChange {
|
|
if keepaliveChange {
|
|
wireguard.UpdateKeepAlive(file, newNode.PersistentKeepalive)
|
|
wireguard.UpdateKeepAlive(file, newNode.PersistentKeepalive)
|
|
}
|
|
}
|
|
|
|
+=======
|
|
|
|
+ err = ncutils.ModPort(&nodeCfg.Node)
|
|
|
|
+ if err != nil {
|
|
|
|
+ logger.Log(0, "error modifying node port on", nodeCfg.Node.Name, "-", err.Error())
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+>>>>>>> b1b376b0 (moving port check logic)
|
|
logger.Log(0, "applying WG conf to "+file)
|
|
logger.Log(0, "applying WG conf to "+file)
|
|
if ncutils.IsWindows() {
|
|
if ncutils.IsWindows() {
|
|
wireguard.RemoveConfGraceful(nodeCfg.Node.Interface)
|
|
wireguard.RemoveConfGraceful(nodeCfg.Node.Interface)
|