]> git.pld-linux.org Git - packages/spamassassin.git/commitdiff
- add force-reload, try-restart auto/ac/spamassassin-3_2_5-5
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 6 Jan 2010 08:28:28 +0000 (08:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    spamassassin-spamd.init -> 1.7

spamassassin-spamd.init

index 1a50191ef26db51dd6d7bbd2dce98fa499cd3e22..f7fbc3d9daa2b2165dc7d9ebf357e612cd0bc71f 100644 (file)
@@ -54,6 +54,17 @@ stop() {
        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 @@ case "$1" in
        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
 
This page took 0.033045 seconds and 4 git commands to generate.