Check if php-fpm is running and start if it’s not running

There are several solution on how to check if php5-fpm is running but they all failed (link1, link2).
The solution to check if php-fpm is running is to use wget to get a file in your server. If wget fails then restart the service.

This is the script to properly check if php-fpm is running and start php-fpm if it’s not running:

 

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.