Browse Source

stop freebsd netclient service during cleanup

Matthew R. Kasun 2 years ago
parent
commit
d1f969be3b
1 changed files with 1 additions and 0 deletions
  1. 1 0
      netclient/daemon/freebsd.go

+ 1 - 0
netclient/daemon/freebsd.go

@@ -108,6 +108,7 @@ func FreebsdDaemon(command string) {
 
 
 // CleanupFreebsd - removes config files and netclient binary
 // CleanupFreebsd - removes config files and netclient binary
 func CleanupFreebsd() {
 func CleanupFreebsd() {
+	ncutils.RunCmd("service netclient stop")
 	RemoveFreebsdDaemon()
 	RemoveFreebsdDaemon()
 	if err := os.RemoveAll(ncutils.GetNetclientPath()); err != nil {
 	if err := os.RemoveAll(ncutils.GetNetclientPath()); err != nil {
 		logger.Log(1, "Removing netclient configs: ", err.Error())
 		logger.Log(1, "Removing netclient configs: ", err.Error())