From 8c456617861bea212244cb529e848e377fe6f987 Mon Sep 17 00:00:00 2001 From: Pavel Ruzicka Date: Tue, 23 Dec 2014 21:37:52 +0100 Subject: [PATCH] debian.init stop and restart --- debian.init | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/debian.init b/debian.init index b21c324..fa8fb84 100644 --- a/debian.init +++ b/debian.init @@ -23,11 +23,17 @@ case "$1" in #/bin/su - brmdoor -c 'cd /home/brmdoor; /usr/bin/screen -dmS brmd -c /home/brmdoor/.screenrc-brmd' ;; - stop|restart|force-reload) - # No-op + stop) + killall brmd.pl + ;; + restart|force-reload) + killall brmd.pl + $(readlink -f "$0") start ;; status) # No-op + # status_of_proc -p $PIDFILE '/usr/bin/perl ./brmd.pl' brmd.pl + # could work but PIDFILE stores different (non-existent) pid ;; *) echo "Usage: $NAME {start|stop|restart|force-reload}" >&2