mirror of
https://github.com/standardnotes/server
synced 2026-07-13 14:01:07 -04:00
18 lines
207 B
Bash
Executable File
18 lines
207 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
host="$1"
|
|
shift
|
|
port="$1"
|
|
shift
|
|
cmd="$@"
|
|
|
|
while ! nc -vz $host $port; do
|
|
>&2 echo "waiting for $host:$port..."
|
|
sleep 1
|
|
done
|
|
|
|
>&2 echo "$host:$port is up - executing command"
|
|
exec $cmd
|