diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2009-09-14 09:52:05 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2009-09-14 09:52:05 +0000 |
| commit | 251066fa400f831c7c1d231ff9ff95d4056bd004 (patch) | |
| tree | ad5b25db5de863e5ba6163cc3676c727cdc9d967 | |
| parent | 0e506885c10264a830bea83fa71afd5dbc7df0c4 (diff) | |
| download | qpid-python-251066fa400f831c7c1d231ff9ff95d4056bd004.tar.gz | |
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@814545 13f79535-47bb-0310-9956-ffa450edef68
| -rwxr-xr-x | qpid/java/broker/bin/qpid.stop | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/qpid/java/broker/bin/qpid.stop b/qpid/java/broker/bin/qpid.stop index 316f8dff46..2a5caac8d4 100755 --- a/qpid/java/broker/bin/qpid.stop +++ b/qpid/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 # |
