summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2014-07-18 20:17:08 +0000
committerAlan Conway <aconway@apache.org>2014-07-18 20:17:08 +0000
commitf6d0e98d352eaa20596906e0a54316b023d99c33 (patch)
treef761d15d1ea18778145f4ebf2b833d457e91f23d /qpid/cpp
parent60254f81d26c37339428162d8789f74dfb27f9d2 (diff)
downloadqpid-python-f6d0e98d352eaa20596906e0a54316b023d99c33.tar.gz
QPID-5719: HA becomes unresponsive once any of the brokers are SIGSTOPed
Fixed typo in qpidd script that was causing this not to work if a backup was SIGSTOPed. Also fixed bug where data-dir setting in qpidd.conf was being ignored. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1611790 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rwxr-xr-xqpid/cpp/etc/qpidd.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/qpid/cpp/etc/qpidd.in b/qpid/cpp/etc/qpidd.in
index b5416668ba..09d87e565d 100755
--- a/qpid/cpp/etc/qpidd.in
+++ b/qpid/cpp/etc/qpidd.in
@@ -50,6 +50,9 @@ QPID_HA_OPTIONS="--config $QPID_CONFIG"
test -f @sysconfdir@/sysconfig/$prog && source @sysconfdir@/sysconfig/$prog
source /etc/rc.d/init.d/functions
+# Data dir: respect the config file if set.
+grep -q '^ *data-dir *=' $QPID_CONFIG || QPIDD_OPTIONS="$QPIDD_OPTIONS --data-dir=$QPID_DATA_DIR"
+
# Check presence of executables/scripts
for f in $QPID_BIN; do
test -x $f || { echo "$f not found or not executable"; exit 5; }
@@ -73,12 +76,21 @@ fi
do_status() {
# Check PID file and ping for liveness
- status $prog && $qpid_ping
+ MESSAGE=$(status $prog) || {
+ RC=$?
+ echo $MESSAGE
+ return $RC
+ }
+ qpid_ping || {
+ return 1
+ }
+ echo $MESSAGE
+ return 0
}
start() {
echo -n $"Starting Qpid AMQP daemon: "
- daemon --pidfile $pidfile --check $prog --user qpidd $QPID_BIN --config $QPID_CONFIG --data-dir $QPID_DATA_DIR --daemon $QPIDD_OPTIONS
+ daemon --pidfile $pidfile --check $prog --user qpidd $QPID_BIN --config $QPID_CONFIG --daemon $QPIDD_OPTIONS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch $lockfile