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