Package: courier-authdaemon
Version: 0.64.0-4
Severity: wishlist
Tags: patch

Here is a patch to support the "status" action in the init script of
courier-authdaemon.

As a side note, it would be nicer if you could make the PID file world
readable, so that the status action can be run by normal users.
diff -u courier-authlib-0.63.0/debian/courier-authdaemon.init courier-authlib-0.63.0/debian/courier-authdaemon.init
--- courier-authlib-0.63.0/debian/courier-authdaemon.init
+++ courier-authlib-0.63.0/debian/courier-authdaemon.init
@@ -15,6 +15,7 @@
 daemonscript="${sbindir}/authdaemond"
 rundir_courier="/var/run/courier"
 rundir="/var/run/courier/authdaemon"
+pidfile="${rundir}/pid"
 
 . /lib/lsb/init-functions
 
@@ -50,8 +51,11 @@
 	$0 stop
 	$0 start
     ;;
+status)
+	status_of_proc -p "$pidfile" "" "authdaemond" && exit 0 || exit $?
+    ;;
 *)
-	echo "Usage: $0 {start|stop|restart|force-reload}" >&2
+	echo "Usage: $0 {start|stop|restart|force-reload||status}" >&2
 	exit 2
 	;;
 esac
diff -u courier-authlib-0.63.0/debian/changelog courier-authlib-0.63.0/debian/changelog
--- courier-authlib-0.63.0/debian/changelog
+++ courier-authlib-0.63.0/debian/changelog
@@ -1,3 +1,9 @@
+courier-authlib (0.63.0-4.1) UNRELEASED; urgency=low
+
+  * Add support for "status" action to authdaemon init script
+
+ -- Peter Eisentraut <[email protected]>  Tue, 25 Oct 2011 06:58:17 +0300
+
 courier-authlib (0.63.0-4) unstable; urgency=low
 
   * Remove umask check from debian/rules (Closes: #634599, thanks to Lucas

Reply via email to