check 467 B

1234567891011121314151617
  1. #!/command/with-contenv /bin/bash
  2. # shellcheck shell=bash
  3. SCRIPT_ROOT=/etc/s6-overlay/scripts
  4. source "$SCRIPT_ROOT/base.sh"
  5. # The config should be ready before starting
  6. source "$GPUSTACK_POSTGRES_CONFIG"
  7. source "$SCRIPT_ROOT/default-variables.sh"
  8. echo "[INFO] Checking Postgres readiness."
  9. if gosu postgres pg_isready -p "$EMBEDDED_DATABASE_PORT" -q; then
  10. echo "[INFO] Postgres is ready."
  11. exit 0
  12. else
  13. echo "[ERROR] Postgres is not ready."
  14. exit 1
  15. fi