mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-13 12:34:30 +08:00
remove debug logs
This commit is contained in:
@@ -182,7 +182,6 @@ func GetPeerUpdate(node *models.Node) (models.PeerUpdate, error) {
|
|||||||
//skip yourself
|
//skip yourself
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
log.Println("adding dns entry for ", peer.Name, " on ", peer.Network, " address ", peer.Address)
|
|
||||||
dns = dns + fmt.Sprintf("%s %s.%s\n", peer.Address, peer.Name, peer.Network)
|
dns = dns + fmt.Sprintf("%s %s.%s\n", peer.Address, peer.Name, peer.Network)
|
||||||
pubkey, err := wgtypes.ParseKey(peer.PublicKey)
|
pubkey, err := wgtypes.ParseKey(peer.PublicKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@@ -3,7 +3,6 @@ package functions
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@@ -198,9 +197,9 @@ func UpdatePeers(client mqtt.Client, msg mqtt.Message) {
|
|||||||
}
|
}
|
||||||
ncutils.Log("received peer update for node " + cfg.Node.Name + " " + cfg.Node.Network)
|
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
|
||||||
//}
|
}
|
||||||
if cfg.Node.DNSOn == "yes" {
|
if cfg.Node.DNSOn == "yes" {
|
||||||
if err := setHostDNS(peerUpdate.DNS, cfg.Node.Network, ncutils.IsWindows()); err != nil {
|
if err := setHostDNS(peerUpdate.DNS, cfg.Node.Network, ncutils.IsWindows()); err != nil {
|
||||||
ncutils.Log("error updating /etc/hosts " + err.Error())
|
ncutils.Log("error updating /etc/hosts " + err.Error())
|
||||||
@@ -215,7 +214,6 @@ func UpdatePeers(client mqtt.Client, msg mqtt.Message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setHostDNS(dns, network string, windows bool) error {
|
func setHostDNS(dns, network string, windows bool) error {
|
||||||
log.Println(dns)
|
|
||||||
etchosts := "/etc/hosts"
|
etchosts := "/etc/hosts"
|
||||||
if windows {
|
if windows {
|
||||||
etchosts = "c:\\windows\\system32\\drivers\\etc\\hosts"
|
etchosts = "c:\\windows\\system32\\drivers\\etc\\hosts"
|
||||||
|
Reference in New Issue
Block a user