Skip to content

Instantly share code, notes, and snippets.

@malev
Created April 13, 2012 04:49
Show Gist options
  • Save malev/2373780 to your computer and use it in GitHub Desktop.
Save malev/2373780 to your computer and use it in GitHub Desktop.
/etc/init.d/php5-fcgi
#!/bin/sh
PHP_SCRIPT=/usr/bin/php5-fcgi
RETVAL=0
case "$1" in
start)
echo "Starting fastcgi"
$PHP_SCRIPT
RETVAL=$?
;;
stop)
echo "Stopping fastcgi"
killall -9 php-cgi
RETVAL=$?
;;
restart)
echo "Restarting fastcgi"
killall -9 php-cgi
$PHP_SCRIPT
RETVAL=$?
;;
*)
echo "Usage: php-fastcgi {start|stop|restart}"
exit 1
;;
esac
exit $RETVAL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment