]> git.pld-linux.org Git - packages/postfix.git/commitdiff
- cosmetic auto/ac/postfix-2_5_7-1
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 24 May 2009 16:16:15 +0000 (16:16 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    postfix.init -> 1.27

postfix.init

index e9388aa551e78b16f7639472a3e06fcab8a2673c..a446c089d8479e43594ab7f3be578828632d788c 100644 (file)
@@ -31,60 +31,62 @@ networking_check() {
 }
 
 start() {
-       local msg
+       if [ -f /var/lock/subsys/postfix ]; then
+               msg_already_running "Postfix"
+               return
+       fi
 
-       if [ ! -f /var/lock/subsys/postfix ]; then
-               msg_starting "Postfix"
-               busy
-               _daemon_set_ulimits
-               msg=$(nice -n ${SERVICE_RUN_NICE_LEVEL:-${DEFAULT_SERVICE_RUN_NICE_LEVEL:-0}} /usr/sbin/postfix start 2>&1)
-               RETVAL=$?
-               if [ $RETVAL -eq 0 ]; then
-                       ok
-                       touch /var/lock/subsys/postfix
-               else
-                       fail
-                       echo >&2 "$msg"
-               fi
+       local msg
+       msg_starting "Postfix"
+       busy
+       _daemon_set_ulimits
+       msg=$(nice -n ${SERVICE_RUN_NICE_LEVEL:-${DEFAULT_SERVICE_RUN_NICE_LEVEL:-0}} /usr/sbin/postfix start 2>&1)
+       RETVAL=$?
+       if [ $RETVAL -eq 0 ]; then
+               ok
+               touch /var/lock/subsys/postfix
        else
-               msg_already_running "Postfix"
+               fail
+               echo >&2 "$msg"
        fi
 }
 
 stop() {
+       if [ ! -f /var/lock/subsys/postfix ]; then
+               msg_not_running "Postfix"
+               return
+       fi
+
        local msg
-       if [ -f /var/lock/subsys/postfix ]; then
-               msg_stopping "Postfix"
-               busy
-               msg=$(/usr/sbin/postfix stop 2>&1)
-               if [ $? -eq 0 ]; then
-                       ok
-               else
-                       fail
-                       echo >&2 "$msg"
-               fi
-               rm -f /var/lock/subsys/postfix
+       msg_stopping "Postfix"
+       busy
+       msg=$(/usr/sbin/postfix stop 2>&1)
+       if [ $? -eq 0 ]; then
+               ok
        else
-               msg_not_running "Postfix"
+               fail
+               echo >&2 "$msg"
        fi
+       rm -f /var/lock/subsys/postfix
 }
 
 reload() {
+       if [ ! -f /var/lock/subsys/postfix ]; then
+               msg_not_running "Postfix"
+               RETVAL=7
+               return
+       fi
+
        local msg
-       if [ -f /var/lock/subsys/postfix ]; then
-               msg_reloading "Postfix"
-               busy
-               msg=$(/usr/sbin/postfix reload 2>&1)
-               RETVAL=$?
-               if [ $RETVAL -eq 0 ]; then
-                       ok
-               else
-                       fail
-                       echo >&2 "$msg"
-                       RETVAL=7
-               fi
+       msg_reloading "Postfix"
+       busy
+       msg=$(/usr/sbin/postfix reload 2>&1)
+       RETVAL=$?
+       if [ $RETVAL -eq 0 ]; then
+               ok
        else
-               msg_not_running "Postfix"
+               fail
+               echo >&2 "$msg"
                RETVAL=7
        fi
 }
This page took 0.047021 seconds and 4 git commands to generate.