youtube_live_calendar/wait-for-it.sh

17 lines
220 B
Bash
Raw Normal View History

2024-12-25 05:29:02 +00:00
#!/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 "$@"