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