Tomcat 6在Ubuntu8.04上设置自启动脚本分享


其它的都跟coldfusion那篇差不多,就直接献上Tomcat 6在Ubuntu8.04上设置自启动脚本 吧:

/etc/init.d/tomcat

#!/bin/sh
# Tomcat auto-start
#
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/tomcat.pid

export JAVA_HOME=/usr/lib/jvm/java-6-sun

case $1 in
start)
sh /opt/apache-tomcat-6.0.16/bin/startup.sh
;;
stop)
sh /opt/apache-tomcat-6.0.16/bin/shutdown.sh
;;
restart)
sh /opt/apache-tomcat-6.0.16/bin/shutdown.sh
sh /opt/apache-tomcat-6.0.16/bin/startup.sh
;;
*)
echo 'Usage:tomcat start|stop|restart'
;;
esac

exit 0

相关内容