From eb5e3600d1e41cc79ef825413bf7c078821dcd5a Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Tue, 14 Apr 2015 16:30:29 +0530 Subject: [PATCH] start: removed `pwfile` logic --- Changelog.md | 3 +++ start | 19 +------------------ 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/Changelog.md b/Changelog.md index 2aaf19f..ffd4b1c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ # Changelog +**latest** +- start: removed `pwfile` logic + **9.4** - postgresql: upgrade to 9.4 diff --git a/start b/start index 14f1293..9c403f6 100755 --- a/start +++ b/start @@ -52,14 +52,8 @@ if [ ! -d ${PG_DATADIR} ]; then # check if we need to perform data migration PG_OLD_VERSION=$(find ${PG_HOME}/[0-9].[0-9]/main -maxdepth 1 -name PG_VERSION 2>/dev/null | sort -r | head -n1 | cut -d'/' -f5) - if [ ! -f "${PG_HOME}/pwfile" ]; then - PG_PASSWORD=$(pwgen -c -n -1 14) - echo "${PG_PASSWORD}" > ${PG_HOME}/pwfile - fi - echo "Initializing database..." - sudo -u postgres -H "${PG_BINDIR}/initdb" \ - --pgdata="${PG_DATADIR}" --pwfile=${PG_HOME}/pwfile \ + sudo -u postgres -H "${PG_BINDIR}/initdb" --pgdata="${PG_DATADIR}" \ --username=postgres --encoding=unicode --auth=trust >/dev/null fi @@ -88,17 +82,6 @@ if [ -n "${PG_OLD_VERSION}" ]; then -O "-c config_file=${PG_CONFDIR}/postgresql.conf" >/dev/null fi -if [ -f ${PG_HOME}/pwfile ]; then - PG_PASSWORD=$(cat ${PG_HOME}/pwfile) - echo "|------------------------------------------------------------------|" - echo "| PostgreSQL User: postgres, Password: ${PG_PASSWORD} |" - echo "| |" - echo "| To remove the PostgreSQL login credentials from the logs, please |" - echo "| make a note of password and then delete the file pwfile |" - echo "| from the data store. |" - echo "|------------------------------------------------------------------|" -fi - if [ -n "${DB_USER}" ]; then if [ -z "${DB_PASS}" ]; then echo ""