From 54c3fe7a1240dbd2875c21fda9949fb8e91ecdef Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Thu, 25 Jul 2013 14:03:13 -0400 Subject: add status command to initscript --- debian/changelog | 6 ++++++ debian/leap-mx.init | 17 ++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 80c6f3d..e4de8f8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +leap-mx (0.2.2.2) unstable; urgency=low + + * Added status command to initscript + + -- Micah Anderson Thu, 25 Jul 2013 14:03:18 -0400 + leap-mx (0.2.2.1) unstable; urgency=low * Fix installation of documentation diff --git a/debian/leap-mx.init b/debian/leap-mx.init index 544230c..6678d90 100644 --- a/debian/leap-mx.init +++ b/debian/leap-mx.init @@ -10,12 +10,11 @@ ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin - -pidfile=/var/run/leap_mx.pid \ -rundir=/var/lib/leap_mx/ \ -file=/usr/share/app/leap_mx.tac \ -logfile=/var/log/leap_mx.log -twistd_path=/usr/bin/twistd +PIDFILE=/var/run/leap_mx.pid +RUNDIR=/var/lib/leap_mx/ +FILE=/usr/share/app/leap_mx.tac +LOGFILE=/var/log/leap_mx.log +TWISTD_PATH=/usr/bin/twistd [ -r /etc/default/leap_mx ] && . /etc/default/leap_mx @@ -51,8 +50,12 @@ case "$1" in $0 restart ;; + status) + status_of_proc -p $PIDFILE $TWISTD_PATH leap_mx && exit 0 || exit $? + ;; + *) - echo "Usage: /etc/init.d/leap_mx {start|stop|restart|force-reload}" >&2 + echo "Usage: /etc/init.d/leap_mx {start|stop|restart|force-reload|status}" >&2 exit 1 ;; esac -- cgit v1.2.3