# restarts radiusd when it dies [which ofcourse
# never happens :)]
#
+# WARNING! This script SHOULD NOT BE USED! It's only here for historical
+# purposes, and WILL be deleted in a future version of the
+# the server.
+#
+# If you want to watch and re-start the server, we recommend
+# reading the file doc/supervise-radiusd.txt
+#
+#
# Version: $Id$
#
sbindir=@sbindir@
localstatedir=@localstatedir@
logdir=@logdir@
-rundir=${localstatedir}/run
+rundir=${localstatedir}/run/radiusd
MAILTO=root
RADIUSD=$sbindir/radiusd
do
# Use `wait', otherwise the trap doesn't work.
$RADIUSD -f $* &
+ echo "$!" > $rundir/radiusd.pid
wait
exec >> $logdir/radwatch.log 2>&1
echo "`date`: Radius died, restarting.."