2012-06-16 07:18:01 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# tomcat-digest script
|
|
|
|
# JPackage Project <http://www.jpackage.org/>
|
2016-04-07 14:59:42 +02:00
|
|
|
|
2012-06-16 07:18:01 +02:00
|
|
|
# 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
|
2016-04-07 14:59:42 +02:00
|
|
|
|
2012-06-16 07:18:01 +02:00
|
|
|
# Get the tomcat config (use this for environment specific settings)
|
|
|
|
if [ -z "${TOMCAT_CFG}" ]; then
|
|
|
|
TOMCAT_CFG="/etc/tomcat/tomcat.conf"
|
|
|
|
fi
|
2016-04-07 14:59:42 +02:00
|
|
|
|
2012-06-16 07:18:01 +02:00
|
|
|
if [ -r "$TOMCAT_CFG" ]; then
|
|
|
|
. $TOMCAT_CFG
|
|
|
|
fi
|
2016-04-07 14:59:42 +02:00
|
|
|
|
2012-06-16 07:18:01 +02:00
|
|
|
set_javacmd
|
2016-04-07 14:59:42 +02:00
|
|
|
|
2012-06-16 07:18:01 +02:00
|
|
|
# CLASSPATH munging
|
|
|
|
if [ -n "$JSSE_HOME" ]; then
|
|
|
|
CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
|
|
|
|
fi
|
|
|
|
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
|
|
|
|
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
|
|
|
|
export CLASSPATH
|
2016-04-07 14:59:42 +02:00
|
|
|
|
2012-06-16 07:18:01 +02:00
|
|
|
# Configuration
|
|
|
|
MAIN_CLASS="org.apache.catalina.startup.Tool"
|
|
|
|
BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
|
2017-12-03 00:45:46 +01:00
|
|
|
BASE_OPTIONS=""
|
2019-01-11 17:11:31 +01:00
|
|
|
BASE_JARS="commons-daemon tomcat/catalina tomcat/servlet"
|
2016-04-07 14:59:42 +02:00
|
|
|
|
2012-06-16 07:18:01 +02:00
|
|
|
# Set parameters
|
|
|
|
set_classpath $BASE_JARS
|
|
|
|
set_flags $BASE_FLAGS
|
|
|
|
set_options $BASE_OPTIONS
|
2016-04-07 14:59:42 +02:00
|
|
|
|
2012-06-16 07:18:01 +02:00
|
|
|
# Let's start
|
2017-12-03 00:45:46 +01:00
|
|
|
run -server org.apache.catalina.realm.RealmBase "$@"
|