Created
August 30, 2012 22:21
-
-
Save jaytaylor/3542939 to your computer and use it in GitHub Desktop.
SendHub API Ubuntu Upstart init script
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
| # SendHub API Service | |
| description "Play-Framework 2.0.x SendHub API" | |
| start on (net-device-up | |
| and local-filesystems | |
| and runlevel [2345]) | |
| stop on runlevel [016] | |
| respawn limit 10 5 | |
| console output | |
| script | |
| export PLAY_PATH='/opt/sendhub/play' | |
| export PLAY_FLAGS='-DapplyEvolutions.default=false -Dconfig.file=conf/prod.conf -Dlogger.file=conf/prod-logger.xml' | |
| export APP_PID_FILE='/tmp/api.pid' | |
| export JVM_FLAGS='' | |
| export DEPLOY_TO='/opt/sendhub/api' | |
| #sudo rm -f -- $APP_PID_FILE | |
| cd "$DEPLOY_TO/current" | |
| sudo -E -u ubuntu ${PLAY_PATH}/play ${PLAY_FLAGS} -Dpidfile.path=${APP_PID_FILE} ${JVM_FLAGS} start | |
| end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment