mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-04 02:44:29 +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
|
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
|
// RemoveSystemDServices - removes the systemd services on a machine
|
||||||
func RemoveSystemDServices(network string) error {
|
func RemoveSystemDServices(network string) error {
|
||||||
//sysExec, err := exec.LookPath("systemctl")
|
//sysExec, err := exec.LookPath("systemctl")
|
||||||
|
|
|
@ -158,6 +158,8 @@ func Uninstall() error {
|
||||||
daemon.CleanupWindows()
|
daemon.CleanupWindows()
|
||||||
} else if ncutils.IsMac() {
|
} else if ncutils.IsMac() {
|
||||||
daemon.CleanupMac()
|
daemon.CleanupMac()
|
||||||
|
} else if ncutils.IsLinux() {
|
||||||
|
daemon.CleanupLinux()
|
||||||
} else if !ncutils.IsKernel() {
|
} else if !ncutils.IsKernel() {
|
||||||
ncutils.PrintLog("manual cleanup required", 1)
|
ncutils.PrintLog("manual cleanup required", 1)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue