Process monitoring services
Solution 1:
daemontools is indeed well proven; the license isn't even problematic anymore, I don't think.
And its FAQ compares it to inittab, which you asked about.
Solution 2:
If you want simple, I'd go with runit. It will restart the service once a second until it is consistently up, can replace scripts in /etc/init.d with a tiny bit of handywork, and has consistent handling all the way around.
The only shortcoming I've had is figuring out single-shot always-on services (services that "start" but in reality exit while leaving a flag that they are "running", i.e. /etc/init.d/networking
really isn't a service but acts like one), there's a bit of hand-holding that goes with it to get that behavior. Most people introduce a secondary tool to suspend the run script from terminating, or infinite-loop it with a sleep
, etc. so that it won't exit the script. When you issue sv stop <service>
it then TERMinates the shell and everything proceeds "as normal".