295e28
#!/bin/bash
295e28
295e28
. /usr/libexec/tomcat/functions
295e28
295e28
# Get the tomcat config (use this for environment specific settings)
295e28
295e28
if [ -z "${TOMCAT_CFG_LOADED}" ]; then
295e28
  if [ -z "${TOMCAT_CFG}" ]; then
295e28
    TOMCAT_CFG="/etc/tomcat/tomcat.conf"
295e28
  fi
295e28
  . $TOMCAT_CFG
295e28
fi
295e28
04fb17
if [ -d "${TOMCAT_CONFD=/etc/tomcat/conf.d}" ]; then
04fb17
  for file in ${TOMCAT_CONFD}/*.conf ; do
04fb17
    if [ -f "$file" ] ; then
04fb17
      . "$file"
04fb17
    fi
04fb17
  done
04fb17
fi
04fb17
295e28
if [ -z "$CATALINA_BASE" ]; then
295e28
  if [ -n "$NAME" ]; then
295e28
    if [ -z "$TOMCATS_BASE" ]; then
295e28
      TOMCATS_BASE="/var/lib/tomcats/"
295e28
    fi
295e28
    CATALINA_BASE="${TOMCATS_BASE}${NAME}"
295e28
  else
295e28
    CATALINA_BASE="${CATALINA_HOME}"
295e28
  fi
295e28
fi
295e28
VERBOSE=1
295e28
set_javacmd
295e28
cd ${CATALINA_HOME}
295e28
# CLASSPATH munging
295e28
if [ ! -z "$CLASSPATH" ] ; then
295e28
  CLASSPATH="$CLASSPATH":
295e28
fi
295e28
295e28
if [ -n "$JSSE_HOME" ]; then
295e28
  CLASSPATH="${CLASSPATH}$(build-classpath jcert jnet jsse 2>/dev/null):"
295e28
fi
295e28
CLASSPATH="${CLASSPATH}${CATALINA_HOME}/bin/bootstrap.jar"
295e28
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
295e28
CLASSPATH="${CLASSPATH}:$(build-classpath commons-daemon 2>/dev/null)"
295e28
295e28
if [ -z "$LOGGING_PROPERTIES" ] ; then
295e28
  LOGGING_PROPERTIES="${CATALINA_BASE}/conf/logging.properties"
295e28
  if [ ! -f "${LOGGING_PROPERTIES}" ] ; then
295e28
    LOGGING_PROPERTIES="${CATALINA_HOME}/conf/logging.properties"
295e28
  fi
295e28
fi