mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-13 00:24:31 +08:00
update logs
This commit is contained in:
parent
09551776fa
commit
12ca8e09aa
1 changed files with 2 additions and 1 deletions
|
@ -196,16 +196,17 @@ func UpdatePeers(client mqtt.Client, msg mqtt.Message) {
|
||||||
ncutils.Log("error syncing wg after peer update: " + err.Error())
|
ncutils.Log("error syncing wg after peer update: " + err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
ncutils.Log("received peer update for node " + cfg.Node.Name + " " + cfg.Node.Network)
|
||||||
//skip dns updates if this is a peer update for comms network
|
//skip dns updates if this is a peer update for comms network
|
||||||
if cfg.Node.NetworkSettings.IsComms == "yes" {
|
if cfg.Node.NetworkSettings.IsComms == "yes" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ncutils.Log("DNS updating /etc/hosts")
|
|
||||||
if cfg.Node.DNSOn == "yes" {
|
if cfg.Node.DNSOn == "yes" {
|
||||||
if err := setHostDNS(peerUpdate.DNS, ncutils.IsWindows()); err != nil {
|
if err := setHostDNS(peerUpdate.DNS, ncutils.IsWindows()); err != nil {
|
||||||
ncutils.Log("error updating /etc/hosts " + err.Error())
|
ncutils.Log("error updating /etc/hosts " + err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
ncutils.Log("DNS updating /etc/hosts")
|
||||||
} else {
|
} else {
|
||||||
if err := removeHostDNS(ncutils.IsWindows()); err != nil {
|
if err := removeHostDNS(ncutils.IsWindows()); err != nil {
|
||||||
ncutils.Log("error removing netmaker profile from /etc/hosts " + err.Error())
|
ncutils.Log("error removing netmaker profile from /etc/hosts " + err.Error())
|
||||||
|
|
Loading…
Add table
Reference in a new issue