cbe921
#!/bin/bash
cbe921
cbe921
. /usr/libexec/tomcat/preamble
cbe921
cbe921
MAIN_CLASS=org.apache.catalina.startup.Bootstrap
cbe921
cbe921
FLAGS="$JAVA_OPTS"
cbe921
OPTIONS="-Dcatalina.base=$CATALINA_BASE \
cbe921
-Dcatalina.home=$CATALINA_HOME \
cbe921
-Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS \
cbe921
-Djava.io.tmpdir=$CATALINA_TMPDIR \
cbe921
-Djava.util.logging.config.file=${LOGGING_PROPERTIES} \
cbe921
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
cbe921
cbe921
if [ "$1" = "start" ] ; then
cbe921
  FLAGS="${FLAGS} $CATALINA_OPTS"
cbe921
  if [ "${SECURITY_MANAGER}" = "true" ] ; then
cbe921
    OPTIONS="${OPTIONS} \
cbe921
    -Djava.security.manager \
cbe921
    -Djava.security.policy==${CATALINA_BASE}/conf/catalina.policy"
cbe921
  fi
cbe921
  run start
cbe921
elif [ "$1" = "stop" ] ; then
cbe921
  run stop
cbe921
fi