Commit 3d8abc65 authored by dmknght's avatar dmknght

Add restart command

parent 6b2ad206
Pipeline #1183 canceled with stages
......@@ -134,6 +134,18 @@ proc stop() =
killApps()
proc restart() =
const
command = "/usr/sbin/service anonsurfd restart"
if getServStatus("anonsurfd") != 1:
if isDesktop:
sendNotify("AnonSurf", "AnonSurf is not running. Can't restart it", "security-low")
else:
echo "[x] AnonSurf is not running. Can't restart it."
return
runOSCommand(command, "Restart AnonSurf Daemon")
proc checkBoot() =
# completed
# no launcher. No send notify
......@@ -251,7 +263,7 @@ proc checkOptions() =
of "stop":
stop()
of "restart":
discard #TODO fix here
restart()
of "status":
status()
of "enable-boot":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment