Files
firefox-accounts-mirror/_scripts/check-mysql.sh
Danny Coates d4da8a3606 feat(docker): created fxa-builder docker image
This adds a base node image and builder image so
that all our service images can share the same
common base, be smaller, and require less customization.
2020-04-22 16:27:22 -07:00

17 lines
252 B
Bash
Executable File

#!/bin/bash -e
PORT=${1:-3306}
HOST=${2:-localhost}
RETRY=60
for i in $(eval echo "{1..$RETRY}"); do
if echo PING | nc "$HOST" "$PORT" | grep -q 'mysql'; then
exit 0
else
if [ "$i" -lt $RETRY ]; then
sleep 1
fi
fi
done
exit 1