启动和关闭JBoss As 7.1.1,脚本例如以下djboss.sh:
#!/bin/sh #JBOSS_HOME JBOSS_HOME=/opt/jboss case "$1" in start) echo "Starting JBoss AS7..." sudo -u jboss sh ${JBOSS_HOME}/bin/standalone.sh & ;; stop) echo "Stopping JBoss AS7..." sudo -u jboss sh ${JBOSS_HOME}/bin/jboss-cli.sh --connect controller=IP:PORT command=:shutdown ;; log) echo "Showing server.log..." tail -1000f ${JBOSS_HOME}/standalone/log/server.log ;; *) echo "Usage: /etc/init.d/jboss {start|stop|log}" exit 1 ;; esac exit 0