Simple Tomcat Startup Script:
#!/bin/sh
# Tomcat Startup Script
CATALINA_HOME=/mnt/apache-tomcat-6.0.20; export CATALINA_HOME
JAVA_HOME=/usr/java/jdk1.6.0_06; export JAVA_HOME
TOMCAT_OWNER=tomcat; export TOMCAT_OWNER
start() {
echo -n "Starting Tomcat: "
su -p -s /bin/sh tomcat $CATALINA_HOME/bin/startup.sh
sleep 2
}
stop() {
echo -n "Stopping Tomcat: "
su -p -s /bin/sh tomcat $CATALINA_HOME/bin/shutdown.sh
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo $"Usage: tomcat {start|stop|restart}"
exit
esac
Friday, July 3, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment