Merge pull request #797 from gravitl/feature_v0.11.0_cleanup_env

adding random comms network name logic
This commit is contained in:
dcarns
2022-02-18 15:33:03 -05:00
committed by GitHub
13 changed files with 95 additions and 119 deletions

View File

@@ -1,7 +1,6 @@
package command
import (
"strconv"
"strings"
"github.com/gravitl/netmaker/netclient/config"
@@ -90,23 +89,6 @@ func Join(cfg config.ClientConfig, privateKey string) error {
return err
}
func getWindowsInterval() int {
interval := 15
networks, err := ncutils.GetSystemNetworks()
if err != nil {
return interval
}
cfg, err := config.ReadConfig(networks[0])
if err != nil {
return interval
}
netint, err := strconv.Atoi(cfg.Server.CheckinInterval)
if err == nil && netint != 0 {
interval = netint
}
return interval
}
// Leave - runs the leave command from cli
func Leave(cfg config.ClientConfig) error {
err := functions.LeaveNetwork(cfg.Network)