| #!/bin/sh | |
| # Check that all members of a cluster are running | |
| source config.sh | |
| HOSTS=(`cat $CLUSTER_HOME/hosts`) | |
| PORTS=(`cat $CLUSTER_HOME/ports`) | |
| for ((i=0; i<${#HOSTS[*]}; ++i)); do | |
| host=${HOSTS[$i]} | |
| port=${PORTS[$i]} | |
| ssh $host "$QPIDD -cp $port" > /dev/null || { | |
| ret=1 | |
| echo "ERROR: broker not running $host:$port" | |
| } | |
| done | |
| exit $ret |