#!/bin/sh # # Startup script for Apache Tomcat with systemd # set -e # Load the service settings . /etc/default/tomcat-instance-{{ item.http_port }} # Find the Java installation . /usr/libexec/tomcat{{ tomcat_version }}/tomcat-locate-java.sh # Set the JSP compiler if configured in the /etc/default/tomcat10 file [ -n "$JSP_COMPILER" ] && JAVA_OPTS="$JAVA_OPTS -Dbuild.compiler=\"$JSP_COMPILER\"" export JAVA_OPTS export JPDA_OPTS # Enable the Java security manager? SECURITY="" [ "$SECURITY_MANAGER" = "true" ] && SECURITY="-security" # Start Tomcat if [ -n $JPDAEXEC ]; then echo "Starting Tomcat with JPDA debugger support" echo "JPDA_OPTS: \"$JPDA_OPTS\"" fi cd $CATALINA_BASE && exec $CATALINA_HOME/bin/catalina.sh $JPDAEXEC run $SECURITY