Skip to content

Instantly share code, notes, and snippets.

@skatsuta
Last active August 29, 2015 14:07
Show Gist options
  • Save skatsuta/31c64454fc0049dae534 to your computer and use it in GitHub Desktop.
Save skatsuta/31c64454fc0049dae534 to your computer and use it in GitHub Desktop.
Tomcat start & stop script
#!/bin/bash
CATALINA_HOME=/usr/local/src/apache-tomcat-8.0.14/
start() {
$CATALINA_HOME/bin/startup.sh
return 0
}
stop() {
$CATALINA_HOME/bin/shutdown.sh
return 0
}
restart() {
stop
sleep 1
start
return 0
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment