diff --git a/assembly/src/release/bin/activemq b/assembly/src/release/bin/activemq index fce73e43b3..d99d112fe9 100755 --- a/assembly/src/release/bin/activemq +++ b/assembly/src/release/bin/activemq @@ -33,6 +33,7 @@ ACTIVEMQ_CONFIGS="/etc/default/activemq $HOME/.activemqrc" # Backup invocation parameters COMMANDLINE_ARGS="$@" +EXEC_OPTION="" # For using instances if ( basename $0 | grep "activemq-instance-" > /dev/null);then @@ -393,7 +394,7 @@ invokeJar(){ fi # Execute java binary if [ -n "$PIDFILE" ] && [ "$PIDFILE" != "stop" ];then - $DOIT_PREFIX "$JAVACMD $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \ + $EXEC_OPTION $DOIT_PREFIX "$JAVACMD $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \ -Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \ -Dactivemq.home=\"${ACTIVEMQ_HOME}\" \ -Dactivemq.base=\"${ACTIVEMQ_BASE}\" \ @@ -407,7 +408,7 @@ invokeJar(){ RET="$?" elif [ -n "$PIDFILE" ] && [ "$PIDFILE" = "stop" ];then PID=`cat $ACTIVEMQ_PIDFILE` - $DOIT_PREFIX "$JAVACMD $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \ + $EXEC_OPTION $DOIT_PREFIX "$JAVACMD $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \ -Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \ -Dactivemq.home=\"${ACTIVEMQ_HOME}\" \ -Dactivemq.base=\"${ACTIVEMQ_BASE}\" \ @@ -419,7 +420,7 @@ invokeJar(){ echo \$APID > $ACTIVEMQ_DATA/stop.pid; exit \$RET" $DOIT_POSTFIX RET="$?" else - $DOIT_PREFIX "$JAVACMD $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \ + $EXEC_OPTION $DOIT_PREFIX "$JAVACMD $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \ -Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \ -Dactivemq.home=\"${ACTIVEMQ_HOME}\" \ -Dactivemq.base=\"${ACTIVEMQ_BASE}\" \ @@ -543,6 +544,7 @@ invoke_console(){ ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $ACTIVEMQ_SUNJMX_START $ACTIVEMQ_SSL_OPTS -Djava.awt.headless=true -Djava.io.tmpdir=\"${ACTIVEMQ_TMP}\"" COMMANDLINE_ARGS="start `echo $COMMANDLINE_ARGS|sed 's,^console,,'`" + EXEC_OPTION="exec" echo "INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C)" invokeJar exit "$?"