Skip to content

Instantly share code, notes, and snippets.

@eskim
Created August 15, 2012 05:50
Show Gist options
  • Save eskim/3356576 to your computer and use it in GitHub Desktop.
Save eskim/3356576 to your computer and use it in GitHub Desktop.
tomcat upstart
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
# adapt paths, if needed
env JAVA_HOME=/opt/java
env CATALINA_HOME=/opt/apache-tomcat
# adapt java options to suit your needs:
env JAVA_OPTS="-Djava.awt.headless=true -Xms512M -Xmx1024M -server -XX:+UseParallelGC"
exec /opt/apache-tomcat/bin/catalina.sh run
# or, as non privileged user:
# script
# exec sudo -u apache-tomcat /opt/apache-tomcat/bin/catalina.sh run
# end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment