auto restarting a daemon process with RHEL's init system
Shane Hathaway
shane at hathawaymix.org
Tue Jun 30 14:49:06 MDT 2009
Michael Torrie wrote:
> Is there any utility program that can wrap a daemon running in an init
> script on RHEL 5 that can auto-restart the actual daemon process when it
> crashes? Obviously a crashing daemon isn't desirable, but sometimes it
> happens and in this case a restart is sufficient and desired. I'd like
> to still work with a script from /etc/init.d, though, so the standard
> runtime logic can apply to it. Does anyone have a good solution? I
> thought about writing a little python program to fork the daemon child
> (gotta love it!) and monitor it for SIGTERM or SIGKILL and restart it.
> The init.d script could treat the python program as the daemon itself.
> If the python script got a kill signal it would pass it on to the child
> and then exit. The changes of the python program dying are much smaller
> than the daemon I'm trying to respawn.
Supervisor.
http://supervisord.org/
I like it, but not just because it's Python. ;-) It really has all the
features listed on the home page.
Shane
More information about the PLUG
mailing list