]> git.pld-linux.org Git - packages/spamassassin.git/commitdiff
- use functions
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 18 Jun 2007 07:38:58 +0000 (07:38 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    spamassassin-spamd.init -> 1.5

spamassassin-spamd.init

index c25139659526d2a432d0a7e5959e3644afbf1852..cc79ba8fb0eb896dd43e5d1c8c7ed0536abfe02e 100644 (file)
@@ -28,9 +28,7 @@ if is_no "${NETWORKING}"; then
        exit 1
 fi
 
-# See how we were called.
-case "$1" in
-  start)
+start() {
        # Start daemon.
        if [ ! -f /var/lock/subsys/spamd ]; then
                msg_starting SpamAssassin
@@ -40,8 +38,9 @@ case "$1" in
        else
                msg_already_running SpamAssassin
        fi
-       ;;
-  stop)
+}
+
+stop() {
        # Stop daemons.
        if [ -f /var/lock/subsys/spamd ]; then
                msg_stopping SpamAssassin
@@ -51,10 +50,19 @@ case "$1" in
        else
                msg_not_running SpamAssassin
        fi
+}
+
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   restart)
-       $0 stop
-       $0 start
+       stop
+       start
        ;;
   status)
        status spamd
This page took 0.04024 seconds and 4 git commands to generate.