case $1 in start) sh $CATALINA_HOME/bin/activemq start ;; stop) sh $CATALINA_HOME/bin/activemq stop ;; restart) sh $CATALINA_HOME/bin/activemq stop sleep 1 sh $CATALINA_HOME/bin/activemq start ;;
esac exit 0
给文件赋权
1
chmod a+x /etc/init.d/activemq
添加开机启动
1
chkconfig --add activemq
常用命令
1 2 3
service activemq start service activemq stop service activemq status