Skip to content

Instantly share code, notes, and snippets.

@mvenkatesh431
Created August 3, 2016 06:57
Show Gist options
  • Save mvenkatesh431/7aff96a7eae22634f55de9555b29bab3 to your computer and use it in GitHub Desktop.
Save mvenkatesh431/7aff96a7eae22634f55de9555b29bab3 to your computer and use it in GitHub Desktop.
#!/bin/bash
# description: Tomcat Start Stop Restart
#
processname: tomcat
# chkconfig: 234 20 80
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-28.b13.el6_6.x86_64/jre/
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CATALINA_HOME=/usr/share/apache-tomcat-8.0.24
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