From: Brian C. <li...@ne...> - 2009-04-21 14:09:49
|
> My Sqlgrey daemon died last night and all of my mail was temp failed. > What do people recommend for making sure the daemon stays running? Is > there a watchdog type program I can run to verify it is running, and if > not, it will automatically restart it for me? I had the same occasional problem and created a "nanny" shell script to monitor. I run it every 10 minutes. This is not foolproof but it works for me. I'm sure someone can make something better. :) #!/bin/bash /sbin/service sqlgrey status > /tmp/sqlgreystat.txt sqlgreystat=`awk '{print $5}' /tmp/sqlgreystat.txt` case "$sqlgreystat" in running...) exit 0 ;; *) /sbin/service sqlgrey restart exit 0 ;; esac |