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