Silver-0-surfer
Well-Known Member
- Joined
- Jan 5, 2008
- Messages
- 317
Hi
we have a server that runs freeradius, and every couple of days it just stops, the radius services, we are in the proccess of building a new server, the only problem is it dies at the most awkward times and then we get calls from people and have to restart it and it fine again..
I wanted to setup a cronjob to check if the radius.pid file exists like every 5 minutes or so and this is what I have
*/5 * * * * bash /home/cronjobs/restart_radius.sh
#!/bin/bash
file=`find /var/run/freeradius/ -name 'freeradius.pid'`
if [ -n "$file" ] ; then
echo "Radius Still up"
else
/etc/init.d/freeradius restart
fi
I am not a programmer/scripter or anything but whats the problem here? I see in the logs it says
Date: Sat, 27 Feb 2010 16:35:02 +0200 (SAST)
* Stopping FreeRADIUS daemon freeradius
* /var/run/freeradius/freeradius.pid not found...
...done.
* Starting FreeRADIUS daemon freeradius
/etc/init.d/freeradius: 63: start-stop-daemon: not found
...done.
So it didn't work and I had to manually type in /etc/init.d/freeradius start and then it comes up
any1 have some ideas as to why this isn;t working
we have a server that runs freeradius, and every couple of days it just stops, the radius services, we are in the proccess of building a new server, the only problem is it dies at the most awkward times and then we get calls from people and have to restart it and it fine again..
I wanted to setup a cronjob to check if the radius.pid file exists like every 5 minutes or so and this is what I have
*/5 * * * * bash /home/cronjobs/restart_radius.sh
#!/bin/bash
file=`find /var/run/freeradius/ -name 'freeradius.pid'`
if [ -n "$file" ] ; then
echo "Radius Still up"
else
/etc/init.d/freeradius restart
fi
I am not a programmer/scripter or anything but whats the problem here? I see in the logs it says
Date: Sat, 27 Feb 2010 16:35:02 +0200 (SAST)
* Stopping FreeRADIUS daemon freeradius
* /var/run/freeradius/freeradius.pid not found...
...done.
* Starting FreeRADIUS daemon freeradius
/etc/init.d/freeradius: 63: start-stop-daemon: not found
...done.
So it didn't work and I had to manually type in /etc/init.d/freeradius start and then it comes up
any1 have some ideas as to why this isn;t working