Skip to content

Instantly share code, notes, and snippets.

@jbrunemann
Created October 13, 2014 13:00
Show Gist options
  • Save jbrunemann/4b2629a7cc1dbe7a4f18 to your computer and use it in GitHub Desktop.
Save jbrunemann/4b2629a7cc1dbe7a4f18 to your computer and use it in GitHub Desktop.
Simple Railo upstart script
description "Railo Server"
start on startup
stop on shutdown
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
# run as non privileged user
setuid railo
setgid www-data
# adapt paths:
env JAVA_HOME=/usr/bin/java
env RAILO_HOME=/opt/railo
# adapt java options to suit your needs:
# env JAVA_OPTS="-Djava.awt.headless=true -Xms512M -Xmx1024M -server -XX:+UseParallelGC"
expect fork
script
cd $RAILO_HOME
./start.sh
end script
# cleanup temp directory after stop
post-stop script
echo "post-stop "
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment