change version of ubuntu

This commit is contained in:
afeiszli
2021-10-19 15:53:01 -04:00
parent 8a2971bef6
commit fb4d2d1272
29 changed files with 497 additions and 1100 deletions

View File

@@ -158,6 +158,8 @@ func Uninstall() error {
daemon.CleanupWindows()
} else if ncutils.IsMac() {
daemon.CleanupMac()
} else if ncutils.IsLinux() {
daemon.CleanupLinux()
} else if !ncutils.IsKernel() {
ncutils.PrintLog("manual cleanup required", 1)
}
@@ -255,32 +257,6 @@ func DeleteInterface(ifacename string, postdown string) error {
return err
}
// List - lists all networks on local machine
func List() error {
networks, err := ncutils.GetSystemNetworks()
if err != nil {
return err
}
for _, network := range networks {
cfg, err := config.ReadConfig(network)
if err == nil {
jsoncfg, _ := json.Marshal(
map[string]string{
"Name": cfg.Node.Name,
"Interface": cfg.Node.Interface,
"PrivateIPv4": cfg.Node.Address,
"PrivateIPv6": cfg.Node.Address6,
"PublicEndpoint": cfg.Node.Endpoint,
})
fmt.Println(network + ": " + string(jsoncfg))
} else {
ncutils.PrintLog(network+": Could not retrieve network configuration.", 1)
}
}
return nil
}
// WipeLocal - wipes local instance
func WipeLocal(network string) error {
cfg, err := config.ReadConfig(network)