daily pastebin goal
11%
SHARE
TWEET

Untitled

a guest Nov 26th, 2012 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Upstart script for a play application that binds to an unprivileged user.
  2. # put this into a file like /etc/init/play.conf
  3. #
  4. # This could be the foundation for pushing play apps to the server using something like git-deploy
  5. # By calling service play stop in the restart command and play-start in the restart command.
  6. #
  7. # Usage:
  8. #   start play
  9. #   stop play
  10. #   restart play
  11. #
  12. # WARNING: This is still beta, I have not tested the respawning functionality, but it should work.
  13. #
  14. # http://leon.radley.se
  15.  
  16. description "foo"
  17. author "me <foo@example.com>"
  18. version "2.0"
  19.  
  20. env USER=tc
  21. env GROUP=tc
  22. env HOME_PATH=/home/tc
  23. env APP_PATH=/home/tc/app
  24. env PORT=9000
  25. env CONFIG=production.conf
  26. env EXTRA="-Xms128M -Xmx512m -server"
  27.  
  28. start on runlevel [2345]
  29. stop on runlevel [06]
  30.  
  31. respawn
  32. respawn limit 10 5
  33. umask 022
  34. expect daemon
  35.  
  36. exec start-stop-daemon --pidfile ${HOME}/RUNNING_PID --chuid $USER:$GROUP --exec ${APP_PATH}/start --background --start -- -Dconfig.resource=$CONFIG -Dhttp.port=$PORT $EXTRA
RAW Paste Data
Top