49 lines
1.2 KiB
Bash
49 lines
1.2 KiB
Bash
#!/bin/sh
|
|
#
|
|
# tomcat6-digest script
|
|
# 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
|
|
TOMCAT_CFG="/etc/tomcat7/tomcat7.conf"
|
|
fi
|
|
|
|
if [ -r "$TOMCAT_CFG" ]; then
|
|
. $TOMCAT_CFG
|
|
fi
|
|
|
|
set_javacmd
|
|
#jsse.jar=$JAVA_HOME/jre/lib/jsse.jar
|
|
#jcert.jar=$JAVA_HOME/jre/lib/jce.jar
|
|
#jnet.jar=$JAVA_HOME/jre/lib/rt.jar
|
|
#jdbc20ext.jar=$JAVA_HOME/jre/lib/rt.jar
|
|
# 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
|
|
|
|
# Configuration
|
|
MAIN_CLASS="org.apache.catalina.startup.Tool"
|
|
BASE_OPTIONS=""
|
|
BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
|
|
BASE_JARS="apache-commons-daemon tomcat7/catalina tomcat7-servlet-3.0-api tomcat7/tomcat-coyote"
|
|
|
|
# Set parameters
|
|
set_classpath $BASE_JARS
|
|
set_flags $BASE_FLAGS
|
|
set_options $BASE_OPTIONS
|
|
|
|
# Let's start
|
|
run "$@"
|