#!/bin/sh # # tomcatctl # # Tomcat control script to control tomcat running under jsvc. # # USAGE: tomcatctl [--jdpa] start|stop|restart|status|info # # To be customized by installer... PREFIX= TOMCAT_USER= WC=wc JSVC="$PREFIX/bin/jsvc" #JSVC_ENV= #JSVC_DEBUG="-debug -verbose" # Calculate CATALINA_HOME based on our location if [ -z "$CATALINA_HOME" ]; then # Handle symlinks PRG="$0" while [ -L "$PRG" ]; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG="`dirname $PRG`/$link" fi done pushd "`dirname \"$PRG\"`/.." > /dev/null CATALINA_HOME="`pwd -P`" popd > /dev/null fi # Source the setenv.sh file to allow user to configure environment # including JAVA_HOME if [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then . "$CATALINA_HOME/bin/setenv.sh" fi # Source the setclasspath.sh file to allow setup of the CLASSPATH variable BASEDIR="$CATALINA_HOME" . "$CATALINA_HOME/bin/setclasspath.sh" # Set variable default values [ -z "$CATALINA_BASE" ] && CATALINA_BASE="${CATALINA_HOME}" [ -z "$CATALINA_TMPDIR" ] && CATALINA_TMPDIR="${CATALINA_BASE}/temp" [ -z "$TOMCAT_PIDNAME" ] && TOMCAT_PIDNAME="tomcat6.pid" [ -z "$TOMCAT_PIDFILE" ] && TOMCAT_PIDFILE="${CATALINA_BASE}/logs/${TOMCAT_PIDNAME}" [ -z "$TOMCAT_USER" ] && TOMCAT_USER=tomcat [ -z "$JAVA_ENDORSED_DIRS" ] && JAVA_ENDORSED_DIRS=${CATALINA_BASE}/common/endorsed [ -z "$JPDA_TRANSPORT" ] && JPDA_TRANSPORT=dt_socket [ -z "$JPDA_ADDRESS" ] && JPDA_ADDRESS=8000 CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/commons-logging-api.jar if [ -r "${CATALINA_HOME}/bin/tomcat-juli.jar" ]; then JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" fi usage() { cat <