diff options
author | Michael Ziegler <diese-addy@funzt-halt.net> | 2012-01-03 00:57:32 +0400 |
---|---|---|
committer | Michael Ziegler <diese-addy@funzt-halt.net> | 2012-01-03 00:57:32 +0400 |
commit | 8ab94fe4da76e0ee16298978350af0175fe51b29 (patch) | |
tree | 37a4542e06973ab650a4764eb70dc91ab9708faf /scripts/murmur.init | |
parent | 935d8ad5c1baaf5d30d457dd60d621a07b2546d8 (diff) |
add 'status' command to the init script
Diffstat (limited to 'scripts/murmur.init')
-rwxr-xr-x | scripts/murmur.init | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/murmur.init b/scripts/murmur.init index e7771e345..85e6f25ae 100755 --- a/scripts/murmur.init +++ b/scripts/murmur.init @@ -79,6 +79,19 @@ case "$1" in 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; + status) + if start-stop-daemon --test --stop --quiet \ + --pidfile $PIDFILE \ + --user $USER \ + --exec $DAEMON + then + [ "$VERBOSE" != no ] && echo "$DESC is running." + exit 0 + else + [ "$VERBOSE" != no ] && echo "$DESC is not running" + exit 3 + fi + ;; force-reload) start-stop-daemon --stop --test --quiet \ --pidfile $PIDFILE \ |