On Tue, Apr 30, 2002 at 09:22:38AM +0500, Junaid Saeed Uppal wrote: > Hello Everyone ...
> I am new to configuring radius , but i got it working , now the problem is
> that when i run the radius deamon , it keeps dying and sending emails to
> root with subject Radius Died , Restarting after about every 20 seconds ...
> i can't figure out whats wrong ... please help .. i am using free radius ...
The radwatch script is supposed to monitor the radius daemon, and
restart it if it dies (which unfortunately still happens often).
However, sometimes the main radiusd process dies, but not all radius
ports are released; which means that restarting radiusd doesn't work,
because it dies right away.
Here, we're using the following modified loop in radwatch to make sure
radius really dies when it's supposed to. You may have to adjust it to
work with the fuser command on your system.
while :
do
# Use `wait', otherwise the trap doesn't work.
$RADIUSD -f $* &
wait
exec >> $logdir/radwatch.log 2>&1
echo "`date`: Radius died, restarting.."
date | mail -s "Radius died, restarting.." $MAILTO
# Force a hangup of whatever's still attached but
# shouldn't be. This spares us *enormous* amounts of spam.
sleep 10
/usr/sbin/fuser -n udp -k -1 1645
done
Cheers,
Steve Langasek
postmodern programmer
msg05230/pgp00000.pgp
Description: PGP signature
