b6a0d1
#!/bin/sh
b6a0d1
#
b6a0d1
# tomcat-digest script
b6a0d1
# JPackage Project <http://www.jpackage.org/>
b6a0d1
b6a0d1
# Source functions library
b6a0d1
if [ -f /usr/share/java-utils/java-functions ] ; then
b6a0d1
  . /usr/share/java-utils/java-functions
b6a0d1
else
b6a0d1
  echo "Can't find functions library, aborting"
b6a0d1
  exit 1
b6a0d1
fi
b6a0d1
b6a0d1
# Get the tomcat config (use this for environment specific settings)
b6a0d1
if [ -z "${TOMCAT_CFG}" ]; then
b6a0d1
    TOMCAT_CFG="/etc/tomcat/tomcat.conf"
b6a0d1
fi
b6a0d1
b6a0d1
if [ -r "$TOMCAT_CFG" ]; then
b6a0d1
    . $TOMCAT_CFG
b6a0d1
fi
b6a0d1
b6a0d1
set_javacmd
b6a0d1
b6a0d1
# CLASSPATH munging
b6a0d1
if [ -n "$JSSE_HOME" ]; then
b6a0d1
  CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
b6a0d1
fi
b6a0d1
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
b6a0d1
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
b6a0d1
export CLASSPATH
b6a0d1
b6a0d1
# Configuration
b6a0d1
MAIN_CLASS="org.apache.catalina.startup.Tool"
b6a0d1
BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
b6a0d1
BASE_OPTIONS=""
b6a0d1
BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan"
b6a0d1
b6a0d1
# Set parameters
b6a0d1
set_classpath $BASE_JARS
b6a0d1
set_flags $BASE_FLAGS
b6a0d1
set_options $BASE_OPTIONS
b6a0d1
b6a0d1
# Let's start
b6a0d1
run -server org.apache.catalina.realm.RealmBase "$@"