Cron Script to Restart Apache/MySQL on Crash (Centos/RHEL)

If you need to auto restart Apache and MySQL in case one or both are crashed, just schedule this SH script on Centos (RHEL) in your cron section.

Save the code section below as in your home directory.
Give the file permissions, so root can execute the script and schedule it in Cron.



In Webmin, you can schedule above script to run every minute, as follows:


Facebook Comments