ispending bug fix and node auth fix

This commit is contained in:
worker-9
2021-08-10 10:55:48 -04:00
parent c799df59ce
commit 46d6899982
4 changed files with 50 additions and 41 deletions

View File

@@ -296,14 +296,18 @@ func LeaveNetwork(network string) error {
}
}
}
err = local.WipeLocal(network)
return RemoveLocalInstance(cfg, network)
}
func RemoveLocalInstance(cfg *config.ClientConfig, networkName string) error {
err := local.WipeLocal(networkName)
if err != nil {
log.Printf("Unable to wipe local config: %v", err)
} else {
log.Println("Removed " + node.Network + " network locally")
log.Println("Removed " + networkName + " network locally")
}
if cfg.Daemon != "off" {
err = local.RemoveSystemDServices(network)
err = local.RemoveSystemDServices(networkName)
}
return err
}