Blame SOURCES/tomcat-9.0-tool-wrapper.script

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