12 lines
184 B
Bash
12 lines
184 B
Bash
|
|
#!/bin/sh
|
||
|
|
# Hang until Postgres has started up.
|
||
|
|
set -e
|
||
|
|
|
||
|
|
host="$1"
|
||
|
|
shift
|
||
|
|
|
||
|
|
until PGPASSWORD="$POSTGRES_PASSWORD" psql -h "$host" -U "$POSTGRES_USER" -c '\q'; do
|
||
|
|
sleep 1
|
||
|
|
done
|
||
|
|
|
||
|
|
exec "$@"
|