Linux – autorestart service

debianlinuxredhatservice

I'm looking for a way to auto-restart a service when it crashes (Apache, Proftpd, Jboss…). I'm running debian. I could script something but I'm trying to find a "good practice" for this.

Do you know a software that can do this?

Thank you

Best Answer

DJB's Daemontools can do exactly what you want.

However, it would be more productive in the long run if you could figure out why things are dying and fix the cause, not the symptom.