]> git.pld-linux.org Git - packages/courier-imap.git/blobdiff - courier-imap-authdaemon.init
- LSB conformance changes
[packages/courier-imap.git] / courier-imap-authdaemon.init
index 37a53cc4758173a41ed183e225e56c1e1694822c..a41b027170e63f4bf814d0e006bf4d9493890abc 100644 (file)
@@ -24,6 +24,7 @@ else
        exit 0
 fi
 
+RETVAL=0
 # See how we were called.
 case "$1" in
   start)
@@ -35,21 +36,18 @@ case "$1" in
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/authdaemon
        else
                msg_already_running "Courier IMAP - Authdaemon"
-               exit 1
        fi
        ;;
   stop)
        if [ -f /var/lock/subsys/authdaemon ]; then
                msg_stopping "Courier IMAP - Authdaemon"
                daemon /usr/lib/courier-imap/authlib/authdaemond.$METHOD stop
-               RETVAL=$?
                rm -f /var/lock/subsys/authdaemon
        else
                msg_not_running "Courier IMAP - Authdaemon"
-               exit 1
        fi
        ;;
-  restart|reload)
+  restart|force-reload)
        # restart related services, if running..
        if [ -f /var/lock/subsys/courier-mta -a \
           -x /etc/rc.d/init.d/courier-mta ]; then
@@ -69,20 +67,20 @@ case "$1" in
        $0 stop
        $0 start
        RETVAL=$?
-       [[ $imaprun -eq 1 ]] && /etc/rc.d/init.d/courier-imap start
-       [[ $poprun -eq 1 ]] && /etc/rc.d/init.d/courier-pop3 start
-       [[ $crun -eq 1 ]] && /etc/rc.d/init.d/courier-mta start
+       [ $imaprun -eq 1 ] && /etc/rc.d/init.d/courier-imap start
+       [ $poprun -eq 1 ] && /etc/rc.d/init.d/courier-pop3 start
+       [ $crun -eq 1 ] && /etc/rc.d/init.d/courier-mta start
        unset crun
        unset poprun
        unset imaprun
        ;;
   status)
        status authdaemond.$METHOD
+       exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|reload|status}"
-       exit 1
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       exit 3
 esac
 
 exit $RETVAL
-
This page took 0.066436 seconds and 4 git commands to generate.