[Pkg-voip-commits] r7437 - in /rtpproxy/trunk/debian: changelog rtpproxy.init
jesusch-guest at alioth.debian.org
jesusch-guest at alioth.debian.org
Tue Jul 21 15:42:18 UTC 2009
Author: jesusch-guest
Date: Tue Jul 21 15:42:16 2009
New Revision: 7437
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=7437
Log:
rtpproxy: Added status() function to initscript
Modified:
rtpproxy/trunk/debian/changelog
rtpproxy/trunk/debian/rtpproxy.init
Modified: rtpproxy/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/rtpproxy/trunk/debian/changelog?rev=7437&op=diff
==============================================================================
--- rtpproxy/trunk/debian/changelog (original)
+++ rtpproxy/trunk/debian/changelog Tue Jul 21 15:42:16 2009
@@ -5,6 +5,9 @@
[ Marcus Better ]
* Remove README.source since we no longer use quilt.
+
+ [ Bjoern Boschman ]
+ * Added status() function to init script
-- Marcus Better <marcus at better.se> Thu, 09 Jul 2009 19:43:30 +0200
Modified: rtpproxy/trunk/debian/rtpproxy.init
URL: http://svn.debian.org/wsvn/pkg-voip/rtpproxy/trunk/debian/rtpproxy.init?rev=7437&op=diff
==============================================================================
--- rtpproxy/trunk/debian/rtpproxy.init (original)
+++ rtpproxy/trunk/debian/rtpproxy.init Tue Jul 21 15:42:16 2009
@@ -47,6 +47,20 @@
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
echo "$NAME."
;;
+ status)
+ echo -n "Status $DESC: "
+ PID=$(cat $PIDFILE)
+ kill -0 $PID
+ rc=$?
+ # Check exit code
+ if [ "$rc" -ne 0 ]
+ then
+ echo "$NAME is NOT running."
+ exit 7
+ else
+ echo "$NAME is running with PID: $PID"
+ fi
+ ;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
@@ -56,7 +70,7 @@
;;
*)
N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ echo "Usage: $N {start|stop|status|restart|force-reload}" >&2
exit 1
;;
esac
More information about the Pkg-voip-commits
mailing list