Skip to content

Instantly share code, notes, and snippets.

@tureki
Created July 30, 2014 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tureki/e599f090d7313c027434 to your computer and use it in GitHub Desktop.
Save tureki/e599f090d7313c027434 to your computer and use it in GitHub Desktop.
hhvm centos6.5 fastcgi init
#!/bin/bash
. /etc/rc.d/init.d/functions
test -x /usr/bin/hhvm || exit 0
case "$1" in
start)
#/usr/bin/hhvm --config /etc/hhvm/config.hdf --user apache --mode daemon
/usr/bin/hhvm --config /etc/hhvm/config.hdf --mode daemon -vServer.Type=fastcgi -vServer.Port=9000
;;
stop)
start-stop-daemon --stop --quiet --oknodo --pidfile /var/hhvm/hhvm.pid
;;
reload|force-reload|restart|try-restart)
$0 start
$0 start
;;
status)
echo "No status"
;;
*)
echo "Usage: /etc/init.d/hhvm {start|stop|restart|status}"
exit 1
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment