0543334466
This keeps the default tomcat.service unchanged (except for internals), and adds template for tomcat@name.service services. In the new world, if you need an instance, you'll create a directory /var/lib/tomcats/name, create {conf temp work webapps} in it, and then systemctl enable tomcat@name.service. This commit doesn't contain anything related to jsvc.
51 lines
1.2 KiB
Bash
51 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
if [ -r /usr/share/java-utils/java-functions ]; then
|
|
. /usr/share/java-utils/java-functions
|
|
else
|
|
echo "Can't read Java functions library, aborting"
|
|
exit 1
|
|
fi
|
|
|
|
# Get the tomcat config (use this for environment specific settings)
|
|
|
|
if [ -z "${TOMCAT_CFG_LOADED}" ]; then
|
|
if [ -z "${TOMCAT_CFG}" ]; then
|
|
TOMCAT_CFG="/etc/tomcat/tomcat.conf"
|
|
fi
|
|
. $TOMCAT_CFG
|
|
fi
|
|
|
|
if [ -z "$CATALINA_BASE" ]; then
|
|
if [ -n "$NAME" ]; then
|
|
if [ -z "$TOMCATS_BASE" ]; then
|
|
TOMCATS_BASE="/var/lib/tomcats/"
|
|
fi
|
|
CATALINA_BASE="${TOMCATS_BASE}${NAME}"
|
|
else
|
|
CATALINA_BASE="${CATALINA_HOME}"
|
|
fi
|
|
fi
|
|
|
|
VERBOSE=1
|
|
set_javacmd
|
|
cd ${CATALINA_HOME}
|
|
# CLASSPATH munging
|
|
if [ ! -z "$CLASSPATH" ] ; then
|
|
CLASSPATH="$CLASSPATH":
|
|
fi
|
|
|
|
if [ -n "$JSSE_HOME" ]; then
|
|
CLASSPATH="${CLASSPATH}$(build-classpath jcert jnet jsse 2>/dev/null):"
|
|
fi
|
|
CLASSPATH="${CLASSPATH}${CATALINA_HOME}/bin/bootstrap.jar"
|
|
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
|
|
CLASSPATH="${CLASSPATH}:$(build-classpath commons-daemon 2>/dev/null)"
|
|
|
|
if [ -z "$LOGGING_PROPERTIES" ] ; then
|
|
LOGGING_PROPERTIES="${CATALINA_BASE}/conf/logging.properties"
|
|
if [ ! -f "${LOGGING_PROPERTIES}" ] ; then
|
|
LOGGING_PROPERTIES="${CATALINA_HOME}/conf/logging.properties"
|
|
fi
|
|
fi
|