youtube_live_calendar/wait-for-it.sh
2024-12-25 14:29:02 +09:00

17 lines
220 B
Bash

#!/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
echo "Waiting for $host:$port to be ready..."
sleep 1
done
exec "$@"