|
@@ -102,10 +102,12 @@ netclient_args="daemon"`
|
|
return nil
|
|
return nil
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// FreebsdDaemon - accepts args to service netclient and applies
|
|
func FreebsdDaemon(command string) {
|
|
func FreebsdDaemon(command string) {
|
|
_, _ = ncutils.RunCmdFormatted("service netclient "+command, true)
|
|
_, _ = ncutils.RunCmdFormatted("service netclient "+command, true)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// CleanupFreebsd - removes config files and netclient binary
|
|
func CleanupFreebsd() {
|
|
func CleanupFreebsd() {
|
|
if err := os.RemoveAll(ncutils.GetNetclientPath()); err != nil {
|
|
if err := os.RemoveAll(ncutils.GetNetclientPath()); err != nil {
|
|
ncutils.PrintLog("Removing netclient configs: "+err.Error(), 1)
|
|
ncutils.PrintLog("Removing netclient configs: "+err.Error(), 1)
|
|
@@ -115,6 +117,7 @@ func CleanupFreebsd() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// RemoveFreebsdDaemon - remove freebsd daemon
|
|
func RemoveFreebsdDaemon() {
|
|
func RemoveFreebsdDaemon() {
|
|
if ncutils.FileExists("/etc/rc.d/netclient") {
|
|
if ncutils.FileExists("/etc/rc.d/netclient") {
|
|
err := os.Remove("/etc/rc.d/netclient")
|
|
err := os.Remove("/etc/rc.d/netclient")
|