-
-
Save tfelix/2643660 to your computer and use it in GitHub Desktop.
Upstart script for Play Framework 2.0
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
# 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 | |
# | |
# Modified to work with a standalone play app, created by the dist command. | |
description "PlayFramework 2" | |
author "Leon Radley <leon@radley.se>" | |
version "1.0" | |
env USER=universitybash | |
env GROUP=universitybash | |
env HOME=/home/universitybash/12UBA | |
env PORT=60001 | |
env CONFIG=production.conf | |
env EXTRA="-Xms64M -Xmx128m -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 ${HOME}/start --background --start -- -Dhttp.port=$PORT -Dconfig.resource=$CONFIG $EXTRA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment