Skip to content

Instantly share code, notes, and snippets.

@jdcauley
Created November 3, 2017 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdcauley/61c871a2be97f744dacd3de193f497f3 to your computer and use it in GitHub Desktop.
Save jdcauley/61c871a2be97f744dacd3de193f497f3 to your computer and use it in GitHub Desktop.
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
setuid tomcat
setgid tomcat
env JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
env CATALINA_HOME=/vagrant
# Modify these options as needed
env JAVA_OPTS="-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom"
env CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC"
exec $CATALINA_HOME/bin/catalina.sh run
# cleanup temp directory after stop
post-stop script
rm -rf $CATALINA_HOME/temp/*
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment