From 79550506a526c4e8f5300902013ad1cc20774b54 Mon Sep 17 00:00:00 2001 From: "Travis R. Clark" Date: Fri, 25 Nov 2016 16:29:32 -0700 Subject: [PATCH] Added Restart Command. I have added the function Restart to the usage capability's. --- Router Resources/init.d/demonsaw | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Router Resources/init.d/demonsaw b/Router Resources/init.d/demonsaw index a61f4dc..1c607be 100644 --- a/Router Resources/init.d/demonsaw +++ b/Router Resources/init.d/demonsaw @@ -35,10 +35,22 @@ case "$1" in echo "Demonsaw should now be killed!" ;; + + restart) + echo "trying to pkill demonsaw" + # pkill should not normally be used as it will stop any process identified. + # This is the best way I could find to kill the server when needed. + pkill demonsaw + echo "Demonsaw should now be killed!" + echo "Starting Demonsaw Now!" + cd /var/www/demonsaw/ + ./demonsaw-screen.sh + + ;; *) - echo "usage: /etc/init.d/demonsaw {start|stop}" + echo "usage: /etc/init.d/demonsaw {start|restart|stop}" exit 1 ;;