Skip to content

Instantly share code, notes, and snippets.

@bendem
Created July 29, 2020 10:22
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 bendem/7e710bebcb04cca25b9830762d8c0e9e to your computer and use it in GitHub Desktop.
Save bendem/7e710bebcb04cca25b9830762d8c0e9e to your computer and use it in GitHub Desktop.
[Unit]
Description=Apache Tomcat Web Application Container
After=network-online.target
Wants=network-online.target
[Service]
User=tomcat
Group=tomcat
WorkingDirectory=/opt/tomcat-9
Environment=CATALINA_HOME=.
Environment=CLASSPATH=bin/bootstrap.jar:bin/tomcat-juli.jar
Environment=JAVA_HOME=/
EnvironmentFile=-/etc/default/tomcat
ExecStart=/bin/bash -c "exec $JAVA_HOME/bin/java \
-Djava.util.logging.config.file="${CATALINA_HOME}/conf/logging.properties" \
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-Djdk.tls.ephemeralDHKeySize=2048 \
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources \
-Dorg.apache.catalina.security.SecurityListener.UMASK=0027 \
-Dignore.endorsed.dirs= \
-classpath ${CLASSPATH} \
-Dcatalina.base=${CATALINA_HOME} \
-Dcatalina.home=${CATALINA_HOME} \
-Djava.io.tmpdir=/tmp \
$JAVA_OPTS \
org.apache.catalina.startup.Bootstrap start"
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment