Skip to content

Instantly share code, notes, and snippets.

@ehyland
Last active October 25, 2021 18:46
Show Gist options
  • Save ehyland/cfb2211276f246cd58134fc8ecdaf419 to your computer and use it in GitHub Desktop.
Save ehyland/cfb2211276f246cd58134fc8ecdaf419 to your computer and use it in GitHub Desktop.
Wait for RabbitMQ
#!/bin/bash
set -e
until timeout 1 bash -c "cat < /dev/null > /dev/tcp/${RABBIT_MQ_HOST}/5672"; do
>&2 echo "Rabbit MQ not up yet on ${RABBIT_MQ_HOST}"
sleep 1
done
echo "Rabbit MQ is up"
# do something
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment