Skip to content

Instantly share code, notes, and snippets.

@cofemei
Created August 15, 2013 02:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cofemei/6237795 to your computer and use it in GitHub Desktop.
Save cofemei/6237795 to your computer and use it in GitHub Desktop.
tomcat 7 init.d
#!/bin/bash
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
JAVA_HOME=/srv/java
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CATALINA_HOME=/srv/tomcat
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