Auto Restart Services if Failed

February 13, 2014 3.3k views
hi my system is centos 6.5 i need to know if there's script to automatic restart the services if failed and it announce to admin by using email. thanks
2 Answers
Hi Agus,

You can try this for the automatic restart of services:

To do email check this one if it helps:
by Etel Sverdlov
This tutorial includes an incredibly simple bash script that checks if a certain program is running. If it is not running, the script will start it up. Additionally the tutorial includes steps on setting up the simple script as a cron job.
Have another answer? Share your knowledge.