-
-
Save yustein/44246be0e847abcd4a1c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hhvm - HipHop VM | |
# | |
# The HipHopVM server provides a high performance PHP stack and web server. | |
# modified by pjv from original found here: http://stackoverflow.com/questions/19013516/upstart-script-for-hhvm-hiphop | |
description "HHVM server" | |
author "pjv https://gist.github.com/pjv/2e9ab32d8d9884bf79a4" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 10 5 | |
umask 022 | |
# Location of config and executable | |
env SERVER=/usr/bin/hhvm | |
env SERVER_CONFIG_FILE="/etc/hhvm/server.ini" | |
env PHP_CONFIG_FILE="/etc/hhvm/php.ini" | |
env RUN_AS=www-data | |
pre-start script | |
if [ ! -d /var/run/hhvm ]; then | |
mkdir -p -m0755 /var/run/hhvm | |
chown $RUN_AS:$RUN_AS /var/run/hhvm | |
fi | |
end script | |
exec $SERVER --mode daemon --config $PHP_CONFIG_FILE --config $SERVER_CONFIG_FILE --user $RUN_AS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment