#!/bin/bash # chkconfig: 2345 99 01 # description: JBoss EAP Start/Stop Script JBOSS_HOME=/opt/jboss JBOSS_USER=jboss case "$1" in start) echo "Starting JBoss EAP 7.3" su - $JBOSS_USER -c "$JBOSS_HOME/bin/standalone.sh -b 0.0.0.0 -c standalone-full.xml" > /dev/null 2>&1 & ;; stop) echo "Stopping JBoss EAP 7.3" su - $JBOSS_USER -c "$JBOSS_HOME/bin/jboss-cli.sh --connect command=:shutdown" > /dev/null 2>&1 ;; *) echo "Usage: $0 {start|stop}" esac