+ if [ $found = 0 ]; then
+ return 2
+ fi
+}
+
+check_conn () {
+ sudo -u rabbitmq rabbitmqctl list_queues -p ${vhost} name messages consumers \
+ | grep "${prefix}-${host}.debian.org" \
+ | check_output
+ ret=$?
+ if [ $ret != 0 ]; then
+ echo "${host} not connected to MQ"
+ return 2
+ fi
+ return 0