Last active
August 29, 2015 14:07
-
-
Save skatsuta/31c64454fc0049dae534 to your computer and use it in GitHub Desktop.
Tomcat start & stop script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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