The following simple bash script may help: #!/bin/bash if [ `ps -ax |grep httpd |grep -v grep |wc -l` -lt 1 ] then echo HTTPD server dead. Restarting HTTPD at `date`... /etc/init.d/httpd restart echo HTTPD Server Started at `date`... fi
Just replace the httpd with your service. And, run this from crontab every 5 or 10 mins. OR, use daemontools: http://cr.yp.to/daemontools.html Regards, +---------------------------------------------------+ | Ziaur Rahman | PGP Key: 0x8B686E8E| | http://zia.info | http://pgp.mit.edu| | | | +---------------------------------------------------+ .-.-.-.-.-.-.-.-.- Quote-o-moment .-.-.-.-.-.-.-.-.-. Life is Roff when yer Stewpid .-.-.-.-.-.-.-.-.- Quote-o-moment .-.-.-.-.-.-.-.-.-. Composing started at: Thu Jun 5 02:28:11 SGT 2003 _) _) _| _ / | _` | | __ \ | _ \ / | ( | | | | __| ( | ___|_|\__,_|_)_|_| _|_| \___/ --.. .. .- .-.-.- .. -. ..-. --- ( morse code ) Quoting Christopher Lyon <[EMAIL PROTECTED]>: | I have been having some problems with some of the services running on | Redhat 8.0. I will do a service <name> start and the service will run | for a while but during the night it will fail. I have fixed the problem | with that service but I want to be e-mailed or paged if this happens | again. Does anybody have any thoughts on this? | | | -- | redhat-list mailing list | unsubscribe mailto:[EMAIL PROTECTED] | https://www.redhat.com/mailman/listinfo/redhat-list | -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list