packages: spamassassin/spamassassin-spamd.init - add force-reload, try-restart

glen glen at pld-linux.org
Wed Jan 6 09:28:33 CET 2010


Author: glen                         Date: Wed Jan  6 08:28:33 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- add force-reload, try-restart

---- Files affected:
packages/spamassassin:
   spamassassin-spamd.init (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: packages/spamassassin/spamassassin-spamd.init
diff -u packages/spamassassin/spamassassin-spamd.init:1.6 packages/spamassassin/spamassassin-spamd.init:1.7
--- packages/spamassassin/spamassassin-spamd.init:1.6	Wed Jan  6 09:27:07 2010
+++ packages/spamassassin/spamassassin-spamd.init	Wed Jan  6 09:28:28 2010
@@ -54,6 +54,17 @@
 	rm -f /var/lock/subsys/spamd
 }
 
+condrestart() {
+	if [ ! -f /var/lock/subsys/spamd ]; then
+		msg_not_running "SpamAssassin"
+		RETVAL=$1
+		return
+	fi
+
+	stop
+	start
+}
+
 # See how we were called.
 case "$1" in
   start)
@@ -66,11 +77,17 @@
 	stop
 	start
 	;;
+  try-restart)
+	condrestart 0
+	;;
+  force-reload)
+	condrestart 7
+	;;
   status)
 	status spamd
 	;;
   *)
-	msg_usage "$0 {start|stop|restart|status}"
+	msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
 	exit 1
 esac
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/spamassassin/spamassassin-spamd.init?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list