summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorTails developers <tails@boum.org>2012-11-03 18:21:34 +0100
committerTails developers <tails@boum.org>2012-11-03 18:36:22 +0100
commit8241897c0ccff1bf8d274c3074580e580ad057be (patch)
treeadef543150f81f902229abe1b9e35d764683f770 /files
parent63772009a1ef90b4f1173142e4d3b1f5c7c6b332 (diff)
Add support for status in initscript
Diffstat (limited to 'files')
-rwxr-xr-xfiles/inoticoming.init8
1 files changed, 6 insertions, 2 deletions
diff --git a/files/inoticoming.init b/files/inoticoming.init
index bc91568..9b658d7 100755
--- a/files/inoticoming.init
+++ b/files/inoticoming.init
@@ -33,7 +33,8 @@ USER=root
. /lib/init/vars.sh
# Define LSB log_* functions.
-# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
. /lib/lsb/init-functions
#
@@ -102,6 +103,9 @@ case "$1" in
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
+ status)
+ status_of_proc -p "$PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
@@ -121,7 +125,7 @@ case "$1" in
esac
;;
*)
- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac