kopia lustrzana https://github.com/OpenDroneMap/WebODM
15 wiersze
214 B
Bash
15 wiersze
214 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
host="$1"
|
||
|
shift
|
||
|
cmd="$@"
|
||
|
|
||
|
until psql -h "$host" -U "postgres" -c '\q'; do
|
||
|
>&2 echo "Postgres is unavailable - sleeping"
|
||
|
sleep 1
|
||
|
done
|
||
|
|
||
|
>&2 echo "Postgres is up - executing command"
|
||
|
exec $cmd
|