Created
May 29, 2015 16:57
-
-
Save borillo/cacc7cc88da529c999ee to your computer and use it in GitHub Desktop.
tomcat-8 start 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 | |
### BEGIN INIT INFO | |
# Provides: tomcat | |
# Required-Start: $network | |
# Required-Stop: $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start/Stop Tomcat server | |
### END INIT INFO | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin | |
start() { | |
sh /usr/share/apache-tomcat-8.0.23/bin/startup.sh | |
} | |
stop() { | |
sh /usr/share/apache-tomcat-8.0.23/bin/shutdown.sh | |
} | |
case $1 in | |
start|stop) $1;; | |
restart) stop; start;; | |
*) echo "Run as $0 <start|stop|restart>"; exit 1;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment