mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-23 13:34:50 +08:00
feat(netclient): config file cleanup on linux
This commit is contained in:
parent
3a399aff23
commit
f51dfb5411
2 changed files with 9 additions and 0 deletions
|
@ -97,6 +97,13 @@ WantedBy=timers.target
|
|||
return nil
|
||||
}
|
||||
|
||||
func CleanupLinux() {
|
||||
err := os.RemoveAll(ncutils.GetNetclientPath())
|
||||
if err != nil {
|
||||
ncutils.PrintLog("Removing netclient binary: "+err.Error(), 1)
|
||||
}
|
||||
}
|
||||
|
||||
// RemoveSystemDServices - removes the systemd services on a machine
|
||||
func RemoveSystemDServices(network string) error {
|
||||
//sysExec, err := exec.LookPath("systemctl")
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue