]> git.pld-linux.org Git - packages/radsecproxy.git/blobdiff - radsecproxy.init
- 1.6.6 (i.e. CVE-2012-4566) rel. 0.1
[packages/radsecproxy.git] / radsecproxy.init
index 95d4a56eaae8cdeb2faed13302d9ee8122380107..f8f2b7b889dbd3a796628628328024b3b927ea57 100644 (file)
@@ -11,7 +11,6 @@
 #              executable on Linux is only about 48 Kb, and it uses about 64 Kb \
 #              (depending on the number of peers) while running. \
 
-
 # Source function library
 . /etc/rc.d/init.d/functions
 
@@ -40,7 +39,7 @@ start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/radsecproxy ]; then
                msg_starting radsecproxy
-               daemon --pidfile /var/run/radsecproxy.pid /usr/sbin/radsecproxy
+               daemon /usr/sbin/radsecproxy -i /var/run/radsecproxy.pid
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/radsecproxy
        else
@@ -58,23 +57,33 @@ stop() {
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/radsecproxy ]; then
+               checkconfig
+               stop
+               start
+       else
+               msg_not_running radsecproxy
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
   start)
-       start
+       start
        ;;
   stop)
-       stop
+       stop
        ;;
   restart)
        checkconfig
        stop
        start
        ;;
-  status)
-       status radsecproxy
-       exit $?
+  try-restart)
+       condrestart 0
        ;;
   reload|force-reload)
        if [ -f /var/lock/subsys/radsecproxy ]; then
@@ -87,8 +96,12 @@ case "$1" in
                exit 7
        fi
        ;;
+  status)
+       status radsecproxy
+       exit $?
+       ;;
   *)
-       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
        exit 3
 esac
 
This page took 0.131058 seconds and 4 git commands to generate.