]> git.pld-linux.org Git - packages/stunnel.git/commitdiff
- cleaning
authorankry <ankry@pld-linux.org>
Sun, 11 May 2003 12:42:55 +0000 (12:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    stunnel.init -> 1.2

stunnel.init

index ca1d2c9b2db9bccf2e12f100ed9d13a8787c825c..0bab2f006833dbd7c79fc5db8d1c55463cad7cba 100644 (file)
@@ -2,7 +2,7 @@
 #
 # stunnel      stunnel (Universal SSL tunnel)
 #
-# chkconfig:    345 14 91      
+# chkconfig:   345 14 91       
 #
 # description: stunnel (Universal SSL tunnel)
 #
 [ -f /etc/sysconfig/stunnel ] && . /etc/sysconfig/stunnel
 
 # Check that networking is up.
-if is_no "${NETWORKING}"; then
-        msg_network_down stunnel
-        exit 1
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network ]; then
+               msg_network_down stunnel
+               exit 1
+       fi
+else
+       exit 0
 fi
 
 # Daemon doesn't die if config doesn't exist
-if [ ! -f $STUNNEL_CONFIG ]; then
-       echo "Stunnel config $STUNNEL_CONFIG does not exist."
+if [ ! -f "$STUNNEL_CONFIG" ]; then
+       nls "%s config %s does not exist." Stunnel "$STUNNEL_CONFIG"
        exit 1
 fi
 
+
 # See how we were called.
 case "$1" in
   start)
@@ -38,32 +43,38 @@ case "$1" in
                msg_starting stunnel; busy
                daemon stunnel $STUNNEL_CONFIG
                RETVAL=$?
-                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/stunnel
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/stunnel
        else
                msg_already_running stunnel
                exit 1
        fi
        ;;
   stop)
-        if [ -f /var/lock/subsys/stunnel ]; then
+       if [ -f /var/lock/subsys/stunnel ]; then
                msg_stopping stunnel
                killproc stunnel
+               RETVAL=$?
                rm -f /var/run/stunnel/stunnel.pid /var/lock/subsys/stunnel >/dev/null 2>&1
        else
                msg_not_running stunnel
                exit 1
        fi      
        ;;
-  restart)
+  restart|reload)
        $0 stop
        $0 start
+       exit $?
+       ;;
+  force-reload)
+       $0 stop && $0 start
+       exit $?
        ;;
   status)
        status stunnel
        exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|status|restart}"
+       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
        exit 1
 esac
 
This page took 0.055594 seconds and 4 git commands to generate.