From: "Roger Peņa Escobio" <[EMAIL PROTECTED]>
>it is important that a services never crash but is more important,
>for me at least, that the service can restart smouthly without human
>intervention (by a bash script for example)

  The follow bash script might help in the meantime:

#!/bin/bash
RESULT=`/usr/local/bin/radtest UserName PassWord localhost 1 testing123 |
grep "Access-Accept" | wc -l`
if [ $RESULT = "0" ]
then
d=`date`
echo "$d" >> /var/log/radtest.log
echo "" >> /var/log/radtest.log
echo "Stopping Radius" >> /var/log/radtest.log
/etc/rc.d/init.d/radiusd stop
sleep 2
echo "Starting Radius in Debug Mode" >> /var/log/radtest.log
/usr/local/sbin/radiusd -X &
sleep 8
echo "Killing Debug Mode Radius" >> /var/log/radtest.log
kill `ps axf | grep radiusd | grep -v grep | awk '{print $1}'`
sleep 2
echo "Starting Radius" >> /var/log/radtest.log
/etc/rc.d/init.d/radiusd start
echo "" >> /var/log/radtest.log
echo "" >> /var/log/radtest.log
fi

  You will need to change the username/password to a valid account to auth
with.  Might
also need to change some other parts to work with your particular system
too.

  Just run it via cron every 15 minutes or so.

  Pete



- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to