Skip to content

Instantly share code, notes, and snippets.

@zdavis
Last active August 29, 2015 14:02
Show Gist options
  • Save zdavis/710dcd755a9397ecb24b to your computer and use it in GitHub Desktop.
Save zdavis/710dcd755a9397ecb24b to your computer and use it in GitHub Desktop.
tomcat init.d script
#!/bin/bash
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
JAVA_HOME=/usr/java/jdk1.7.0_60
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CATALINA_HOME=/var/lib/tomcat7
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