From 2af478b7cd7ca89b84a5800577dc256ae312523c Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Wed, 4 Feb 2015 12:16:35 +0530 Subject: [PATCH] start: create pwfile only if it does not already exist --- start | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/start b/start index 0d34518..7087036 100755 --- a/start +++ b/start @@ -32,11 +32,16 @@ cat >> ${PG_CONFDIR}/pg_hba.conf < ${PG_HOME}/pwfile + fi + echo "Initializing database..." - PG_PASSWORD=$(pwgen -c -n -1 14) - echo "${PG_PASSWORD}" > ${PG_HOME}/pwfile sudo -u postgres -H "${PG_BINDIR}/initdb" \ --pgdata="${PG_DATADIR}" --pwfile=${PG_HOME}/pwfile \ --username=postgres --encoding=unicode --auth=trust >/dev/null