本文共 587 字,大约阅读时间需要 1 分钟。
#!/bin/bash
#Description: 启动、停止或重启ActiveMQ服务脚本#Processname: ActiveMQ#Chkconfig: 234 20 80
JAVA_HOME=/usr/java/jdk1.7.0_25export JAVA_HOMEPATH=$JAVA_HOME/bin:$PATHexport PATHCATALINA_HOME=/usr/local/apache-activemq-5.5.1
case $1 instart)cd $CATALINA_HOME/bin./activemq startsudo -H -u amp bash -c './activemq start';;stop)cd $CATALINA_HOME/bin./activemq stopsudo -H -u amp bash -c './activemq stop';;restart)cd $CATALINA_HOME/bin./activemq stop./activemq startsudo -H -u amp bash -c '$CATALINA_HOME/bin/activemq stop'sudo -H -u amp bash -c '$CATALINA_HOME/bin/activemq start';;esac
exit 0
转载地址:http://pmwfk.baihongyu.com/