/etc/init.d/tomcat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# ================================================================== | |
# ______ __ | |
# /_ __/___ ____ ___ _________ _/ /_ | |
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ | |
# / / / /_/ / / / / / / /__/ /_/ / /_ | |
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ | |
# Based On: | |
# http://www.springsource.com/files/uploads/tomcat/tomcatx-performance-tuning.pdf | |
# http://www.springsource.com/files/u1/PerformanceTuningApacheTomcat-Part2.pdf | |
# http://www.springsource.com/files/uploads/tomcat/tomcatx-large-scale-deployments.pdf | |
# ================================================================== | |
### BEGIN INIT INFO | |
# Provides: tomcat6 | |
# Required-Start: $network $syslog $remote_fs | |
# Required-Stop: $network $syslog | |
# Default-Start: | |
# Default-Stop: | |
# Short-Description: Tomcat Server | |
# Description: Tomcat Server | |
# | |
### END INIT INFO | |
case $1 in | |
start) | |
cd /opt/tomcat | |
su -c "./server.sh start" tomcat | |
;; | |
stop) | |
cd /opt/tomcat | |
su -c "./server.sh stop" tomcat | |
;; | |
restart) | |
cd /opt/tomcat | |
su -c "./server.sh stop" tomcat | |
su -c "./server.sh start" tomcat | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation
sudo chmod 755 /etc/init.d/tomcat
suse
/sbin/insserv -d tomcat
ubuntu
sudo ln -s /etc/init.d/tomcat /etc/rc1.d/K99tomcat
sudo ln -s /etc/init.d/tomcat /etc/rc2.d/S99tomcat