Created
June 19, 2013 14:55
-
-
Save derek-schaefer/5814957 to your computer and use it in GitHub Desktop.
A sample Upstart script for managing a Play application. Bypasses the "start" 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 "Play" | |
env USER=user | |
env GROUP=group | |
env HOME=/opt/yourapp | |
env JAVA=/usr/bin/java | |
env JAVA_OPTS="-cp ./staged/* play.core.server.NettyServer ./.." | |
env PORT=80 | |
env EXTRA="-Xms128M -Xmx512m -server" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
exec start-stop-daemon --start --chdir ${HOME} --exec /usr/bin/java \ | |
-- -Dhttp.port=$PORT $EXTRA $JAVA_OPTS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment