summaryrefslogtreecommitdiff
path: root/packaging/rpm/radsecproxy.sysv
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/rpm/radsecproxy.sysv')
-rw-r--r--packaging/rpm/radsecproxy.sysv81
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