From e2e4f4e3450d13176a84b93736abb21f9a9df1fe Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Mon, 14 Sep 2009 09:52:05 +0000 Subject: QPID-2100 : Updated qpid.stop to use QPID_PNAME variable as the search. This brings it in line with qpid-run. If QPID_PNAME is not set then it will fall back to QPID_STOP_SERVER so as to main backward compatibility. If neither are set then it will only use -DPNAME=" as the search. Thus allowing the value to have been changed and this script still to detect QPID processes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@814545 13f79535-47bb-0310-9956-ffa450edef68 --- java/broker/bin/qpid.stop | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'java') diff --git a/java/broker/bin/qpid.stop b/java/broker/bin/qpid.stop index 316f8dff46..2a5caac8d4 100755 --- a/java/broker/bin/qpid.stop +++ b/java/broker/bin/qpid.stop @@ -25,12 +25,20 @@ MAX_ATTEMPTS=2 SLEEP_DELAY=1 -DEFAULT_SEARCH="PNAME=QPBRKR" +DEFAULT_SEARCH="\-DPNAME=\"" -if [ -z "$QPID_STOP_SEARCH" ]; then - SEARCH=$DEFAULT_SEARCH; +# +# Use QPID_PNAME to set search criteria. +# - If not set default back to attempting QPID_STOP_SEARCH +# +if [ -z "$QPID_PNAME" ]; then + if [ -z "$QPID_STOP_SEARCH" ]; then + SEARCH=$DEFAULT_SEARCH; + else + SEARCH=$DEFAULT_SEARCH$QPID_STOP_SEARCH; + fi else - SEARCH=$QPID_STOP_SEARCH; + SEARCH=$DEFAULT_SEARCH$QPID_PNAME; fi # -- cgit v1.2.1