#!/bin/sh 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