Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A8B09B95 for ; Wed, 22 Feb 2012 17:26:30 +0000 (UTC) Received: (qmail 18392 invoked by uid 500); 22 Feb 2012 17:26:30 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 18343 invoked by uid 500); 22 Feb 2012 17:26:30 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 18334 invoked by uid 99); 22 Feb 2012 17:26:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 17:26:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 17:26:26 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 007692388980 for ; Wed, 22 Feb 2012 17:26:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1292403 - /activemq/trunk/assembly/src/release/bin/activemq Date: Wed, 22 Feb 2012 17:26:05 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120222172606.007692388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Wed Feb 22 17:26:05 2012 New Revision: 1292403 URL: http://svn.apache.org/viewvc?rev=1292403&view=rev Log: https://issues.apache.org/jira/browse/AMQ-3248 make some fixes to the activemq script. Modified: activemq/trunk/assembly/src/release/bin/activemq Modified: activemq/trunk/assembly/src/release/bin/activemq URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/release/bin/activemq?rev=1292403&r1=1292402&r2=1292403&view=diff ============================================================================== --- activemq/trunk/assembly/src/release/bin/activemq (original) +++ activemq/trunk/assembly/src/release/bin/activemq Wed Feb 22 17:26:05 2012 @@ -91,13 +91,7 @@ fi # Active MQ configuration directory if [ -z "$ACTIVEMQ_CONF" ] ; then - # Preserve old configuration setting functionality. - if [ -z "$ACTIVEMQ_CONFIG_DIR" ] ; then - ACTIVEMQ_CONF="$ACTIVEMQ_BASE/conf" - ACTIVEMQ_CONF_DIR="ACTIVEMQ_DATA" - else - ACTIVEMQ_CONF="$ACTIVEMQ_CONFIG_DIR" - fi + ACTIVEMQ_CONF="$ACTIVEMQ_BASE/conf" fi # Configure a user with non root priviledges, if no user is specified do not change user @@ -107,13 +101,7 @@ fi # Active MQ data directory if [ -z "$ACTIVEMQ_DATA" ] ; then - # Preserve old configuration setting functionality. - if [ -z "$ACTIVEMQ_DATA_DIR" ] ; then - ACTIVEMQ_DATA="$ACTIVEMQ_BASE/data" - ACTIVEMQ_DATA_DIR="ACTIVEMQ_DATA" - else - ACTIVEMQ_DATA="$ACTIVEMQ_DATA_DIR" - fi + ACTIVEMQ_DATA="$ACTIVEMQ_BASE/data" fi setCurrentUser(){ @@ -125,18 +113,18 @@ setCurrentUser(){ fi } -if [ ! -d "$ACTIVEMQ_DATA_DIR" ]; then +if [ ! -d "$ACTIVEMQ_DATA" ]; then setCurrentUser if ( [ -z "$ACTIVEMQ_USER" ] || [ "$ACTIVEMQ_USER" = "$CUSER" ] );then - mkdir $ACTIVEMQ_DATA_DIR + mkdir $ACTIVEMQ_DATA elif [ "`id -u`" = "0" ];then - su -c "mkdir $ACTIVEMQ_DATA_DIR" - $ACTIVEMQ_USER; + su -c "mkdir $ACTIVEMQ_DATA" - $ACTIVEMQ_USER; fi fi # Location of the pidfile if [ -z "$ACTIVEMQ_PIDFILE" ]; then - ACTIVEMQ_PIDFILE="$ACTIVEMQ_DATA_DIR/activemq-`hostname`.pid" + ACTIVEMQ_PIDFILE="$ACTIVEMQ_DATA/activemq-`hostname`.pid" fi # Location of the java installation @@ -161,7 +149,7 @@ fi # JMX access is needed for quering a running activemq instance to gain data or to # trigger management operations. # -# Example for ${ACTIVEMQ_CONFIG_DIR}/jmx.access: +# Example for ${ACTIVEMQ_CONF}/jmx.access: # --- # # The "monitorRole" role has readonly access. # # The "controlRole" role has readwrite access. @@ -169,7 +157,7 @@ fi # controlRole readwrite # --- # -# Example for ${ACTIVEMQ_CONFIG_DIR}/jmx.password: +# Example for ${ACTIVEMQ_CONF}/jmx.password: # --- # # The "monitorRole" role has password "abc123". # # # The "controlRole" role has password "abcd1234". @@ -178,8 +166,8 @@ fi # --- # # ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=11099 " -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONFIG_DIR}/jmx.password" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONFIG_DIR}/jmx.access" +# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" +# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" @@ -340,6 +328,8 @@ fi if [ "$OSTYPE" = "cygwin" ];then ACTIVEMQ_HOME=`cygpath --windows "$ACTIVEMQ_HOME"` ACTIVEMQ_BASE=`cygpath --windows "$ACTIVEMQ_BASE"` + ACTIVEMQ_CONF=`cygpath --windows "$ACTIVEMQ_CONF"` + ACTIVEMQ_DATA=`cygpath --windows "$ACTIVEMQ_DATA"` ACTIVEMQ_CLASSPATH=`cygpath --path --windows "$ACTIVEMQ_CLASSPATH"` JAVA_HOME=`cygpath --windows "$JAVA_HOME"` CLASSPATH=`cygpath --path --windows "$CLASSPATH"` @@ -351,10 +341,7 @@ fi # Set default classpath # Add instance conf dir before AMQ install conf dir to pick up instance-specific classpath entries first -ACTIVEMQ_CLASSPATH="${ACTIVEMQ_CONFIG_DIR};${ACTIVEMQ_CLASSPATH}" -if [ "${ACTIVEMQ_BASE}" != "${ACTIVEMQ_HOME}" ]; then - ACTIVEMQ_CLASSPATH="${ACTIVEMQ_BASE}/conf;${ACTIVEMQ_CLASSPATH}" -fi +ACTIVEMQ_CLASSPATH="${ACTIVEMQ_CONF};${ACTIVEMQ_CLASSPATH}" # Start the ActiveMQ JAR # @@ -412,7 +399,7 @@ invokeJar(){ $ACTIVEMQ_CYGWIN \ -jar \"${ACTIVEMQ_HOME}/bin/run.jar\" $COMMANDLINE_ARGS --pid $PID & RET=\"\$?\"; APID=\"\$!\"; - echo \$APID > $ACTIVEMQ_DATA_DIR/stop.pid; exit \$RET" $DOIT_POSTFIX + echo \$APID > $ACTIVEMQ_DATA/stop.pid; exit \$RET" $DOIT_POSTFIX RET="$?" else $DOIT_PREFIX "$JAVACMD $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \ @@ -457,7 +444,7 @@ checkRunning(){ } checkStopRunning(){ - PID=$ACTIVEMQ_DATA_DIR/stop.pid + PID=$ACTIVEMQ_DATA/stop.pid if [ -f "$PID" ]; then if [ -z "`cat $PID`" ];then echo "ERROR: Pidfile '$PID' exists but contains no pid" @@ -600,7 +587,7 @@ invoke_stop(){ exit 0 fi rm -f $ACTIVEMQ_PIDFILE >/dev/null 2>&1 - rm -f $ACTIVEMQ_DATA_DIR/stop.pid >/dev/null 2>&1 + rm -f $ACTIVEMQ_DATA/stop.pid >/dev/null 2>&1 exit $RET }