Skip to content

Instantly share code, notes, and snippets.

@sytkov
Created November 7, 2012 12:24
Show Gist options
  • Save sytkov/4031270 to your computer and use it in GitHub Desktop.
Save sytkov/4031270 to your computer and use it in GitHub Desktop.
/etc/init.d/tomcat7
#!/bin/sh
#
# Description: /opt/tomcat7 Start Stop Restart
# processname: tomcat7
# chkconfig: 2345 20 80
export JDK_HOME=/usr/java/jdk1.6.0_37
export JRE_HOME=/usr/java/jdk1.6.0_37/jre
CATALINA_HOME=/opt/tomcat7
CATALINA_OPTS="-Xms512M -Xmx1024M"
case $1 in
start)
sh $CATALINA_HOME/bin/startup.sh
;;
stop)
sh $CATALINA_HOME/bin/shutdown.sh
;;
restart)
sh $CATALINA_HOME/bin/shutdown.sh
sh $CATALINA_HOME/bin/startup.sh
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment