mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-26 09:02:57 +08:00
remove debug logs
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
This commit is contained in:
parent
9897b2228c
commit
ab8cf43b3b
1 changed files with 5 additions and 10 deletions
|
@ -20,7 +20,6 @@ import (
|
||||||
"github.com/gravitl/netmaker/netclient/daemon"
|
"github.com/gravitl/netmaker/netclient/daemon"
|
||||||
"github.com/gravitl/netmaker/netclient/ncutils"
|
"github.com/gravitl/netmaker/netclient/ncutils"
|
||||||
"github.com/gravitl/netmaker/netclient/wireguard"
|
"github.com/gravitl/netmaker/netclient/wireguard"
|
||||||
"github.com/kr/pretty"
|
|
||||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -42,15 +41,13 @@ func Daemon() error {
|
||||||
// == initial pull of all networks ==
|
// == initial pull of all networks ==
|
||||||
networks, _ := ncutils.GetSystemNetworks()
|
networks, _ := ncutils.GetSystemNetworks()
|
||||||
for _, network := range networks {
|
for _, network := range networks {
|
||||||
serverSet[network] = exists
|
cfg := config.ClientConfig{}
|
||||||
pretty.Println(serverSet)
|
cfg.Network = network
|
||||||
|
cfg.ReadConfig()
|
||||||
|
serverSet[cfg.Server.Server] = exists
|
||||||
//temporary code --- remove in version v0.13.0
|
//temporary code --- remove in version v0.13.0
|
||||||
removeHostDNS(network, ncutils.IsWindows())
|
removeHostDNS(network, ncutils.IsWindows())
|
||||||
// end of code to be removed in version v0.13.0
|
// end of code to be removed in version v0.13.0
|
||||||
var cfg config.ClientConfig
|
|
||||||
cfg.Network = network
|
|
||||||
cfg.ReadConfig()
|
|
||||||
initialPull(cfg.Network)
|
initialPull(cfg.Network)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,8 +105,6 @@ func UpdateKeys(nodeCfg *config.ClientConfig, client mqtt.Client) error {
|
||||||
// PingServer -- checks if server is reachable
|
// PingServer -- checks if server is reachable
|
||||||
// use commsCfg only*
|
// use commsCfg only*
|
||||||
func PingServer(cfg *config.ClientConfig) error {
|
func PingServer(cfg *config.ClientConfig) error {
|
||||||
fmt.Println("ping server ", cfg.Server.Server)
|
|
||||||
pretty.Println(cfg)
|
|
||||||
pinger, err := ping.NewPinger(cfg.Server.Server)
|
pinger, err := ping.NewPinger(cfg.Server.Server)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -270,7 +265,7 @@ func setupMQTTSub(server string) mqtt.Client {
|
||||||
// utilizes comms client configs to setup connections
|
// utilizes comms client configs to setup connections
|
||||||
func setupMQTT(cfg *config.ClientConfig, publish bool) mqtt.Client {
|
func setupMQTT(cfg *config.ClientConfig, publish bool) mqtt.Client {
|
||||||
opts := mqtt.NewClientOptions()
|
opts := mqtt.NewClientOptions()
|
||||||
server := cfg.Node.Server
|
server := cfg.Server.Server
|
||||||
opts.AddBroker(server + ":1883") // TODO get the appropriate port of the comms mq server
|
opts.AddBroker(server + ":1883") // TODO get the appropriate port of the comms mq server
|
||||||
opts.ClientID = ncutils.MakeRandomString(23) // helps avoid id duplication on broker
|
opts.ClientID = ncutils.MakeRandomString(23) // helps avoid id duplication on broker
|
||||||
opts.SetDefaultPublishHandler(All)
|
opts.SetDefaultPublishHandler(All)
|
||||||
|
|
Loading…
Reference in a new issue