Skip to content

Instantly share code, notes, and snippets.

@felipelavinz
Created May 3, 2011 02:11
Show Gist options
  • Save felipelavinz/952694 to your computer and use it in GitHub Desktop.
Save felipelavinz/952694 to your computer and use it in GitHub Desktop.
PHP FastCGI process checker
#! /bin/bash
if curl --write-out %{http_code} --silent --output /dev/null http://www.yukei.net | grep 504
then
killall -s KILL php-cgi
spawn-fcgi -U www-data -G www-data -a 127.0.0.1 -p 47990 /usr/bin/php-cgi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment