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