Skip to content

Instantly share code, notes, and snippets.

@happy-coding
Created September 1, 2012 07:22
Show Gist options
  • Save happy-coding/3566377 to your computer and use it in GitHub Desktop.
Save happy-coding/3566377 to your computer and use it in GitHub Desktop.
wrapper for starting spawn-fcgi
#!/bin/bash
case $1 in
start)
echo $$ > /var/run/fastcgi-php.pid;
exec 2>&1 /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -g www-data -f /usr/bin/php5-cgi -P /var/run/fastcgi-php.pid
;;
stop)
kill `cat /var/run/fastcgi-php.pid` ;;
*)
echo "usage: spawn-fcgi {start|stop}" ;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment