File tomcat-9.0-digest.script of Package tomcat (Revision 1337ecfd8f9a0bd54db5e7376fee3053)
Currently displaying revision 1337ecfd8f9a0bd54db5e7376fee3053 , Show latest
46
1
#!/bin/sh
2
#
3
# tomcat-digest script
4
# JPackage Project <http://www.jpackage.org/>
5
6
# Source functions library
7
if [ -f /usr/share/java-utils/java-functions ] ; then
8
. /usr/share/java-utils/java-functions
9
else
10
echo "Can't find functions library, aborting"
11
exit 1
12
fi
13
14
# Get the tomcat config (use this for environment specific settings)
15
if [ -z "${TOMCAT_CFG}" ]; then
16
TOMCAT_CFG="/etc/tomcat/tomcat.conf"
17
fi
18
19
if [ -r "$TOMCAT_CFG" ]; then
20
. $TOMCAT_CFG
21
fi
22
23
set_javacmd
24
25
# CLASSPATH munging
26
if [ -n "$JSSE_HOME" ]; then
27
CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
28
fi
29
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
30
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
31
export CLASSPATH
32
33
# Configuration
34
MAIN_CLASS="org.apache.catalina.startup.Tool"
35
BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
36
BASE_OPTIONS=""
37
BASE_JARS="commons-daemon tomcat/catalina tomcat/servlet"
38
39
# Set parameters
40
set_classpath $BASE_JARS
41
set_flags $BASE_FLAGS
42
set_options $BASE_OPTIONS
43
44
# Let's start
45
run -server org.apache.catalina.realm.RealmBase "$@"
46