#!/bin/ksh # description: start/stop the Jakarta Tomcat web application server . /lib/svc/share/smf_include.sh # the BASEDIR of the tomcat installation CATALINA_HOME=@CLIENT_BASEDIR@/tomcat60 case "$1" in 'start') if [ -x ${CATALINA_HOME}/bin/startup.sh ]; then ${CATALINA_HOME}/bin/startup.sh if [ $? -ne 0 ]; then exit $SMF_EXIT_ERR_FATAL fi else echo "${CATALINA_HOME}/bin/startup.sh is not executable!" exit $SMF_EXIT_ERR_FATAL fi ;; 'stop') if [ -x ${CATALINA_HOME}/bin/shutdown.sh ]; then ${CATALINA_HOME}/bin/shutdown.sh if [ $? -ne 0 ]; then exit $SMF_EXIT_ERR_FATAL fi else echo "${CATALINA_HOME}/bin/shutdown.sh is not executable!" echo "Unable to shutdown Tomcat!" exit $SMF_EXIT_ERR_FATAL fi ;; esac exit $SMF_EXIT_OK