]> git.pld-linux.org Git - packages/courier-authlib.git/blobdiff - courier-authlib.init
- rel 5
[packages/courier-authlib.git] / courier-authlib.init
index a0f746635eb08c961b9e45672e3d908bdd389753..0527ad4ca28f837747ebdfbbff2191a0a249eaab 100644 (file)
@@ -3,7 +3,7 @@
 # courier-authlib      courier-authlib
 #
 # chkconfig:   345 85 15
-# description: courier-authlib 
+# description: courier-authlib
 #
 
 # Source function library
@@ -18,7 +18,6 @@
 # Check that networking is up.
 if is_yes "${NETWORKING}"; then
        if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
-               # nls "ERROR: Networking is down. %s can't be run." <service>
                msg_network_down courier-authlib
                exit 1
        fi
@@ -26,42 +25,50 @@ else
        exit 0
 fi
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
+start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/courier-authlib ]; then
                msg_starting courier-authlib
-               daemon /usr/sbin/authdaemond
+               daemon /usr/sbin/authdaemond start
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/courier-authlib
        else
                msg_already_running courier-authlib
        fi
-       ;;
-  stop)
+}
+
+stop() {
        # Stop daemons.
        if [ -f /var/lock/subsys/courier-authlib ]; then
                msg_stopping courier-authlib
-               killproc authdaemond
+               daemon /usr/sbin/authdaemond stop
                rm -f /var/lock/subsys/courier-authlib >/dev/null 2>&1
        else
                msg_not_running courier-authlib
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   status)
        status authdaemond
        RETVAL=$?
        ;;
   restart)
-       $0 stop
-       $0 start
+       stop
+       start
        ;;
   reload|force-reload|graceful)
        if [ -f /var/lock/subsys/courier-authlib ]; then
                msg_reloading courier-authlib
-               killproc authdaemond -HUP
+               daemon /usr/sbin/authdaemond restart
                RETVAL=$?
        else
                msg_not_running courier-authlib
This page took 0.078989 seconds and 4 git commands to generate.