Package: imapproxy
Version: 1.2.6-5
Severity: wishlist
Tags: patch

Here is a patch to support the "status" action in the init.d script.
diff -u up-imapproxy-1.2.6/debian/changelog up-imapproxy-1.2.6/debian/changelog
--- up-imapproxy-1.2.6/debian/changelog
+++ up-imapproxy-1.2.6/debian/changelog
@@ -1,3 +1,10 @@
+up-imapproxy (1.2.6-5.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * status support
+
+ -- Peter Eisentraut <[email protected]>  Sat, 02 May 2009 18:38:49 +0300
+
 up-imapproxy (1.2.6-5) unstable; urgency=high
 
   * Don't overwrite the config file on upgrades. (Closes: #510432)
diff -u up-imapproxy-1.2.6/debian/control up-imapproxy-1.2.6/debian/control
--- up-imapproxy-1.2.6/debian/control
+++ up-imapproxy-1.2.6/debian/control
@@ -9,7 +9,7 @@
 
 Package: imapproxy
 Architecture: any
-Depends: lsb-base, ${shlibs:Depends}, ${misc:Depends}, ucf (>= 0.28)
+Depends: lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}, ucf (>= 0.28)
 Description: IMAP protocol proxy
  UP-ImapProxy proxies IMAP transactions between an IMAP client and an IMAP
  server. The general idea is that the client should never know that it is
diff -u up-imapproxy-1.2.6/debian/imapproxy.init.d up-imapproxy-1.2.6/debian/imapproxy.init.d
--- up-imapproxy-1.2.6/debian/imapproxy.init.d
+++ up-imapproxy-1.2.6/debian/imapproxy.init.d
@@ -38,7 +38,7 @@
 . /lib/lsb/init-functions
 
 test -r ${DEFAULT} && . ${DEFAULT}
-if [ "$START" = "no" -a "$1" != "stop" ]; then
+if [ "$START" = "no" -a "$1" != "stop" -a "$1" != "status" ]; then
 	log_warning_msg "Not starting imapproxy - disabled in ${DEFAULT}";
 	exit 0;
 fi
@@ -80,10 +80,13 @@
 	sleep 2		# not gratuituous
 	$0 start
 	;;
+  status)
+	status_of_proc $DAEMON $NAME -p $PIDFILE
+	;;
   *)
 	N=/etc/init.d/$NAME
 	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
-	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
 	exit 1
 	;;
 esac

Reply via email to