View Full Version : How to Set a Cron Job to Restart UltimateIRCd, Anope, and Eggdrop when they are Down?


Derek
20th December 2005, 04:10 AM
Hey,

Does anyone know a script that I can set as a cron job to check to see if all three of those are up, and if they aren't restart them for me automatically?

Thanks,
Derek

Floris
20th December 2005, 04:11 AM
These daemons come with a .chk script. You can edit crontab to add the cronline. After which it can check every 15 minutes or so.

What makes editing crontab easier for pico editor lovers is the following line:

export EDITOR=pico

once done, you can crontab -e which will load the crontab in pico.

Now you can simply add something like:

*/10 * * * * /home/path/NeoStats/cronchk >/dev/null 2>&1
0,10,20,30,40,50 * * * * /home/path/UltimateIRCd/bin/ircdchk >/dev/null 2>&1
*/10 * * * * /home/path/services/services.chk >/dev/null 2>&1
0 21 * * * /home/path/backup >/dev/null 2>&1


First line runs my neostats services check script.
second one the ultimate ircd
third the anope services
and finally a custom backup script

Derek
20th December 2005, 04:13 AM
Thanks Floris, I'll give it a try :)