Updated copyright year
[freeradius.git] / scripts / radwatch.in
index 4c8473d..854324b 100755 (executable)
@@ -9,7 +9,7 @@
 #             the server.
 #
 #             If you want to watch and re-start the server, we recommend
-#             reading the file ../doc/supervise-radiusd.txt
+#             reading the file doc/supervise-radiusd.txt
 #
 #
 # Version:     $Id$
@@ -20,7 +20,7 @@ exec_prefix=@exec_prefix@
 sbindir=@sbindir@
 localstatedir=@localstatedir@
 logdir=@logdir@
-rundir=${localstatedir}/run
+rundir=${localstatedir}/run/radiusd
 
 MAILTO=root
 RADIUSD=$sbindir/radiusd
@@ -46,6 +46,7 @@ ulimit -c unlimited
        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.."