diff --git a/tools/postgres-init-db b/tools/postgres-init-db index e593e87128..f2e41a6684 100755 --- a/tools/postgres-init-db +++ b/tools/postgres-init-db @@ -33,7 +33,10 @@ ALTER ROLE $USERNAME SET search_path TO $SEARCH_PATH; EOF umask go-rw -echo "*:*:*:$USERNAME:$PASSWORD" >> ~/.pgpass +PGPASS_LINE="*:*:*:$USERNAME:$PASSWORD" +if ! $(grep -q "$PGPASS_LINE" ~/.pgpass); then + echo $PGPASS_LINE >> ~/.pgpass +fi chmod go-rw ~/.pgpass psql -h localhost postgres $USERNAME <