summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2009-09-14 09:52:05 +0000
committerMartin Ritchie <ritchiem@apache.org>2009-09-14 09:52:05 +0000
commite2e4f4e3450d13176a84b93736abb21f9a9df1fe (patch)
tree3eb8474b71e1ae3d207899ba9214638cd5b70d9d
parent560bc6be9e3a898c51f2e65221680abbafb4d2c0 (diff)
downloadqpid-python-e2e4f4e3450d13176a84b93736abb21f9a9df1fe.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/qpid@814545 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-xjava/broker/bin/qpid.stop16
1 files changed, 12 insertions, 4 deletions
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
#