]> git.pld-linux.org Git - packages/spamassassin.git/commitdiff
- unify, simplify
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 6 Jan 2010 08:27:07 +0000 (08:27 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    spamassassin-spamd.init -> 1.6

spamassassin-spamd.init

index cc79ba8fb0eb896dd43e5d1c8c7ed0536abfe02e..1a50191ef26db51dd6d7bbd2dce98fa499cd3e22 100644 (file)
@@ -24,32 +24,34 @@ fi
 
 # Check that networking is up.
 if is_no "${NETWORKING}"; then
-       msg_network_down SpamAssassin
+       msg_network_down "SpamAssassin"
        exit 1
 fi
 
 start() {
        # Start daemon.
-       if [ ! -f /var/lock/subsys/spamd ]; then
-               msg_starting SpamAssassin
-               daemon spamd $SPAMD_OPTS
-               RETVAL=$?
-               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/spamd
-       else
-               msg_already_running SpamAssassin
+       if [ -f /var/lock/subsys/spamd ]; then
+               msg_already_running "SpamAssassin"
+               return
        fi
+
+       msg_starting "SpamAssassin"
+       daemon /usr/sbin/spamd $SPAMD_OPTS
+       RETVAL=$?
+       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/spamd
 }
 
 stop() {
        # Stop daemons.
-       if [ -f /var/lock/subsys/spamd ]; then
-               msg_stopping SpamAssassin
-               killproc spamd
-               RETVAL=$?
-               rm -f /var/lock/subsys/spamd
-       else
-               msg_not_running SpamAssassin
+       if [ ! -f /var/lock/subsys/spamd ]; then
+               msg_not_running "SpamAssassin"
+               return
        fi
+
+       msg_stopping "SpamAssassin"
+       killproc spamd
+       RETVAL=$?
+       rm -f /var/lock/subsys/spamd
 }
 
 # See how we were called.
This page took 0.059695 seconds and 4 git commands to generate.