# 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
# 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
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
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