#!/bin/sh

JAVA_HOME=/usr/local/jdk1.1.8
export JAVA_HOME
TOMCAT_HOME=/usr/local/tomcat
export TOMCAT_HOME

case "$1" in
	start)
		if [ -f /usr/local/tomcat/bin/tomcat.sh ]; then
			/bin/sh /usr/local/tomcat/bin/tomcat.sh start > /dev/null && echo ' tomcat'
		fi
		;;
	stop)
		if [ -f /usr/local/tomcat/bin/tomcat.sh ]; then
			/bin/sh /usr/local/tomcat/bin/tomcat.sh stop > /dev/null && echo ' tomcat'
		fi
		;;
	*)
		echo ""
		echo "Usage: `basename $0` { start | stop }"
		echo ""
		exit 64
		;;
esac
