fix: consider authentication failure as a fatal error

This commit is contained in:
Tuan Le
2023-01-20 13:51:28 -05:00
committed by Steve Chavez
parent 775c006806
commit 8aa79086d2
5 changed files with 28 additions and 3 deletions
+5 -1
View File
@@ -54,6 +54,10 @@ let
export PGDATABASE
export PGRST_DB_SCHEMAS
HBA_FILE="$tmpdir/pg_hba.conf"
echo "local $PGDATABASE some_protected_user password" > "$HBA_FILE"
echo "local $PGDATABASE all trust" >> "$HBA_FILE"
log "Initializing database cluster..."
# We try to make the database cluster as independent as possible from the host
# by specifying the timezone, locale and encoding.
@@ -62,7 +66,7 @@ let
log "Starting the database cluster..."
# Instead of listening on a local port, we will listen on a unix domain socket.
pg_ctl -l "$tmpdir/db.log" -w start -o "-F -c listen_addresses=\"\" -k $PGHOST -c log_statement=\"all\"" \
pg_ctl -l "$tmpdir/db.log" -w start -o "-F -c listen_addresses=\"\" -c hba_file=$HBA_FILE -k $PGHOST -c log_statement=\"all\"" \
>> "$setuplog"
# shellcheck disable=SC2317