mirror of
https://github.com/cpacker/MemGPT.git
synced 2025-06-03 04:30:22 +00:00
17 lines
220 B
Bash
17 lines
220 B
Bash
#!/bin/bash
|
|
# wait-for-it.sh
|
|
|
|
set -e
|
|
|
|
host="$1"
|
|
shift
|
|
cmd="$@"
|
|
|
|
until curl -s "$host" > /dev/null; do
|
|
>&2 echo "Service is unavailable - sleeping"
|
|
sleep 1
|
|
done
|
|
|
|
>&2 echo "Service is up - executing command"
|
|
exec $cmd
|