postgres/rootfs/bin/db-password

10 lines
271 B
Plaintext
Raw Permalink Normal View History

2022-02-14 18:17:15 +00:00
#!/bin/sh
2022-02-13 07:23:50 +00:00
echo "local all all trust" > "$PGDATA/pg_hba.conf"
pg_ctl -D "$PGDATA" -o "-c listen_addresses='localhost'" -w start
psql --command "ALTER USER postgres WITH PASSWORD '${POSTGRES_PASSWORD}';"
pg_ctl -D "$PGDATA" -o "-c listen_addresses='localhost'" -w stop