|
|
23bf51 |
#!/bin/bash
|
|
|
23bf51 |
|
|
|
23bf51 |
. /usr/libexec/tomcat/functions
|
|
|
23bf51 |
|
|
|
23bf51 |
# Get the tomcat config (use this for environment specific settings)
|
|
|
23bf51 |
|
|
|
23bf51 |
if [ -z "${TOMCAT_CFG_LOADED}" ]; then
|
|
|
23bf51 |
if [ -z "${TOMCAT_CFG}" ]; then
|
|
|
23bf51 |
TOMCAT_CFG="/etc/tomcat/tomcat.conf"
|
|
|
23bf51 |
fi
|
|
|
23bf51 |
. $TOMCAT_CFG
|
|
|
23bf51 |
fi
|
|
|
23bf51 |
|
|
|
23bf51 |
if [ -d "${TOMCAT_CONFD=/etc/tomcat/conf.d}" ]; then
|
|
|
23bf51 |
for file in ${TOMCAT_CONFD}/*.conf ; do
|
|
|
23bf51 |
if [ -f "$file" ] ; then
|
|
|
23bf51 |
. "$file"
|
|
|
23bf51 |
fi
|
|
|
23bf51 |
done
|
|
|
23bf51 |
fi
|
|
|
23bf51 |
|
|
|
23bf51 |
if [ -z "$CATALINA_BASE" ]; then
|
|
|
23bf51 |
if [ -n "$NAME" ]; then
|
|
|
23bf51 |
if [ -z "$TOMCATS_BASE" ]; then
|
|
|
23bf51 |
TOMCATS_BASE="/var/lib/tomcats/"
|
|
|
23bf51 |
fi
|
|
|
23bf51 |
CATALINA_BASE="${TOMCATS_BASE}${NAME}"
|
|
|
23bf51 |
else
|
|
|
23bf51 |
CATALINA_BASE="${CATALINA_HOME}"
|
|
|
23bf51 |
fi
|
|
|
23bf51 |
fi
|
|
|
23bf51 |
VERBOSE=1
|
|
|
23bf51 |
set_javacmd
|
|
|
23bf51 |
cd ${CATALINA_HOME}
|
|
|
23bf51 |
# CLASSPATH munging
|
|
|
23bf51 |
if [ ! -z "$CLASSPATH" ] ; then
|
|
|
23bf51 |
CLASSPATH="$CLASSPATH":
|
|
|
23bf51 |
fi
|
|
|
23bf51 |
|
|
|
23bf51 |
if [ -n "$JSSE_HOME" ]; then
|
|
|
23bf51 |
CLASSPATH="${CLASSPATH}$(build-classpath jcert jnet jsse 2>/dev/null):"
|
|
|
23bf51 |
fi
|
|
|
23bf51 |
CLASSPATH="${CLASSPATH}${CATALINA_HOME}/bin/bootstrap.jar"
|
|
|
23bf51 |
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
|
|
|
23bf51 |
|
|
|
23bf51 |
# Since ECJ is no longer available, add ant, ant-launcher, and tools jars to the
|
|
|
23bf51 |
# classpath so that runtime compilation of JSPs still works.
|
|
|
23bf51 |
CLASSPATH="${CLASSPATH}:/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar"
|
|
|
23bf51 |
CLASSPATH="${CLASSPATH}:/usr/lib/jvm/java/lib/tools.jar"
|
|
|
23bf51 |
|
|
|
23bf51 |
if [ -z "$LOGGING_PROPERTIES" ] ; then
|
|
|
23bf51 |
LOGGING_PROPERTIES="${CATALINA_BASE}/conf/logging.properties"
|
|
|
23bf51 |
if [ ! -f "${LOGGING_PROPERTIES}" ] ; then
|
|
|
23bf51 |
LOGGING_PROPERTIES="${CATALINA_HOME}/conf/logging.properties"
|
|
|
23bf51 |
fi
|
|
|
23bf51 |
fi
|