Created
April 13, 2020 08:52
-
-
Save smallsong/eaed9c00053463a2d87e2d2fbe504c0e to your computer and use it in GitHub Desktop.
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 | |
# chkconfig: 2345 10 90 | |
# description: activemq .... | |
prog=tomcat | |
JAVA_HOME=/usr/local/java/jdk1.7.0_25 | |
export JAVA_HOME | |
CATALANA_HOME=/home/activemq | |
export CATALINA_HOME | |
case "$1" in | |
start) | |
echo "Starting $prog..." | |
$CATALANA_HOME/bin/activemq start | |
;; | |
stop) | |
echo "Stopping $prog..." | |
$CATALANA_HOME/bin/activemq stop | |
;; | |
restart) | |
echo "Stopping $prog..." | |
$CATALANA_HOME/bin/activemq stop | |
sleep 2 | |
echo | |
echo "Starting $prog..." | |
$CATALANA_HOME/bin/activemq start | |
;; | |
*) | |
echo "Usage: $prog {start|stop|restart}" | |
;; | |
esac | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment