Created
December 21, 2015 22:42
-
-
Save adeubank/1a8db1958578146120a2 to your computer and use it in GitHub Desktop.
Tomcat Upstart service with open JDK 8 for Ubuntu 14.04
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
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=/opt/tomcat | |
# 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