Created
December 9, 2013 23:23
-
-
Save forficate/7882965 to your computer and use it in GitHub Desktop.
Play framework upstart script
This file contains 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
description "My Play App" | |
env USER=myappname | |
env GROUP=myappname | |
env HOME=/var/play/myappname | |
env PORT=9000 | |
env ADDRESS=127.0.0.1 | |
env EXTRA="-Xms128M -Xmx512m -server" | |
start on (filesystem and net-device-up IFACE=lo) | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 10 5 | |
umask 022 | |
expect daemon | |
pre-start script | |
chdir $HOME | |
end script | |
exec start-stop-daemon --pidfile ${HOME}/RUNNING_PID --chuid $USER:$GROUP --exec ${HOME}/start --background --start -- -Dhttp.port=$PORT -Dhttp.address=$ADDRESS $EXTRA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment