- # Upstart script for a play application that binds to an unprivileged user.
- # put this into a file like /etc/init/play.conf
- #
- # This could be the foundation for pushing play apps to the server using something like git-deploy
- # By calling service play stop in the restart command and play-start in the restart command.
- #
- # Usage:
- # start play
- # stop play
- # restart play
- #
- # WARNING: This is still beta, I have not tested the respawning functionality, but it should work.
- #
- # http://leon.radley.se
- description "foo"
- author "me <foo@example.com>"
- version "2.0"
- env USER=tc
- env GROUP=tc
- env HOME_PATH=/home/tc
- env APP_PATH=/home/tc/app
- env PORT=9000
- env CONFIG=production.conf
- env EXTRA="-Xms128M -Xmx512m -server"
- start on runlevel [2345]
- stop on runlevel [06]
- respawn
- respawn limit 10 5
- umask 022
- expect daemon
- exec start-stop-daemon --pidfile ${HOME}/RUNNING_PID --chuid $USER:$GROUP --exec ${APP_PATH}/start --background --start -- -Dconfig.resource=$CONFIG -Dhttp.port=$PORT $EXTRA
SHARE
TWEET
Untitled
a guest
Nov 26th, 2012
41
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data
