diff options
author | venaas <venaas> | 2007-06-19 09:25:50 +0000 |
---|---|---|
committer | venaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf> | 2007-06-19 09:25:50 +0000 |
commit | 7799f8b5b69dc62e1bc0d429a50d79e438c86cef (patch) | |
tree | 2dd64e676dc37f864b079c8aeedde2e8dfbeb35a /packaging/rpm/radsecproxy.sysv | |
parent | 30c9519e38b5c55b80a12911795c6c04a5fd4625 (diff) |
fixed another new bug, thanks Hans
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@142 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'packaging/rpm/radsecproxy.sysv')
-rw-r--r-- | packaging/rpm/radsecproxy.sysv | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/packaging/rpm/radsecproxy.sysv b/packaging/rpm/radsecproxy.sysv new file mode 100644 index 0000000..38a5055 --- /dev/null +++ b/packaging/rpm/radsecproxy.sysv @@ -0,0 +1,81 @@ +#!/bin/bash +# +# init script for radsecproxy +# +# chkconfig: 345 95 05 +# description: RADIUS UDP and RADSEC proxy +# +# config: /etc/radsecproxy.conf + +source /etc/init.d/functions +source /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +[ -x /usr/sbin/radsecproxy ] || exit 1 +[ -f /etc/radsecproxy.conf ] || exit 1 + +RETVAL=0 +prog="radsecproxy" +desc="RADSEC Proxying" + +start() { + echo -n $"Starting $desc ($prog): " + daemon /usr/sbin/$prog || RETVAL=1 + + if [ $RETVAL -eq 0 ]; then + success "$prog startup" + rm -f /var/lock/subsys/$prog + else + failure "$prog startup" + fi + + echo + return $RETVAL +} + +stop() { + echo -n $"Stopping $desc ($prog): " + killproc $prog || RETVAL=1 + + if [ $RETVAL -eq 0 ]; then + success "$prog shutdown" + rm -f /var/lock/subsys/$prog + else + failure "$prog shutdown" + fi + + echo + return $RETVAL +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + condrestart) + [ -e /var/lock/subsys/$prog ] && restart + RETVAL=$? + ;; + status) + status $prog + RETVAL=$? + ;; + *) + echo $"Usage $0 {start|stop|restart|reload|condrestart|status}" + RETVAL=1 +esac + +exit $RETVAL |