#!/bin/sh
#
# Startup script for the tomcat
#
# chkconfig: 345 80 15
# description: Tomcat is a Servlet+JSP Engine.
# Source function library.
. /etc/rc.d/init.d/functions
case "$1" in
'start')
if [ -f /usr/local/jakarta-tomcat-4.0.1/bin/startup.sh ]; then
echo "Starting the tomcat service "
su - nobody -c "export JAVA_HOME=/usr/local/jdk1.3.1_01;/usr/local/j
akarta-tomcat-4.0.1/bin/startup.sh"
fi
;;
'stop')
echo "Stopping the tomcat service."
su - nobody -c "export JAVA_HOME=/usr/local/jdk1.3.1_01;/usr/local/jakar
ta-tomcat-4.0.1/bin/shutdown.sh"
;;
'restart')
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
;;
esac
exit 0
|