[Pkg-voip-commits] r3532 - openser/trunk/debian
Julien Blache
jblache at alioth.debian.org
Sat May 12 10:08:19 UTC 2007
Author: jblache
Date: 2007-05-12 10:08:19 +0000 (Sat, 12 May 2007)
New Revision: 3532
Modified:
openser/trunk/debian/changelog
openser/trunk/debian/openser.init
Log:
Add status support to the initscript.
Modified: openser/trunk/debian/changelog
===================================================================
--- openser/trunk/debian/changelog 2007-05-12 09:50:23 UTC (rev 3531)
+++ openser/trunk/debian/changelog 2007-05-12 10:08:19 UTC (rev 3532)
@@ -8,6 +8,8 @@
+ Build at -O2 on arm again, now that #390694 is fixed.
* debian/openser.init:
+ Create /var/run/openser if it doesn't exist.
+ + Add status support, patch from Henning Westerholt
+ <henning.westerholt at 1und1.de>.
* debian/openser.dirs:
+ Added; add /var/run/openser to the package.
* debian/openser.examples:
@@ -19,7 +21,7 @@
* debian/patches/22_perl_sysv_sem.dpatch:
+ Removed; merged upstream.
- -- Julien BLACHE <jblache at debian.org> Sat, 12 May 2007 11:49:44 +0200
+ -- Julien BLACHE <jblache at debian.org> Sat, 12 May 2007 12:07:40 +0200
openser (1.2.0-4) unstable; urgency=low
Modified: openser/trunk/debian/openser.init
===================================================================
--- openser/trunk/debian/openser.init 2007-05-12 09:50:23 UTC (rev 3531)
+++ openser/trunk/debian/openser.init 2007-05-12 10:08:19 UTC (rev 3532)
@@ -134,9 +134,25 @@
$PIDFILE --exec $DAEMON -- $OPTIONS
echo "."
;;
+ status)
+ echo -n "Status of $DESC: "
+
+ if [ ! -r "$PIDFILE" ]; then
+ echo "$NAME is not running."
+ exit 3
+ fi
+
+ if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
+ echo "$NAME is running."
+ exit 0
+ else
+ echo "$NAME is not running but $PIDFILE exists."
+ exit 1
+ fi
+ ;;
*)
N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart|force-reload|debug}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload|status|debug}" >&2
exit 1
;;
esac
More information about the Pkg-voip-commits
mailing list