activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [01/10] git commit: Fixes AMQ-4806: './bin/activemq console' should 'exec' java so that way scripts calling it can get the pid for the broker's java process.
Date Tue, 11 Mar 2014 23:29:27 GMT
Repository: activemq
Updated Branches:
  refs/heads/activemq-5.9 c39f428b0 -> 6dbbdcc93


Fixes AMQ-4806: './bin/activemq console' should 'exec' java so that way scripts calling it
can get the pid for the broker's java process.


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/4dd1cba4
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/4dd1cba4
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/4dd1cba4

Branch: refs/heads/activemq-5.9
Commit: 4dd1cba41295a0b4b7a25715e613ca9dfde1e82f
Parents: c39f428
Author: Hiram Chirino <hiram@hiramchirino.com>
Authored: Tue Oct 15 10:54:58 2013 -0400
Committer: Hadrian Zbarcea <hadrian@apache.org>
Committed: Tue Mar 11 17:04:36 2014 -0400

----------------------------------------------------------------------
 assembly/src/release/bin/activemq | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/4dd1cba4/assembly/src/release/bin/activemq
----------------------------------------------------------------------
diff --git a/assembly/src/release/bin/activemq b/assembly/src/release/bin/activemq
index fce73e4..d99d112 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 "$?"


Mime
View raw message