#!/usr/bin/env bash # wait-for-it.sh -- Wait for a TCP port to be ready set -e host="$1" shift port="$1" shift until nc -z "$host" "$port"; do sleep 1 done exec "$@"