fix missing echo and change login to md5

This commit is contained in:
André Bauer 2016-10-31 16:18:13 +01:00 committed by GitHub
parent e4d3f4704b
commit af6f10def5

View file

@ -43,8 +43,8 @@ else
echo "backuping postgres config" echo "backuping postgres config"
test -f /var/lib/pgsql/data/pg_hba.conf.bak || cp /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf.bak test -f /var/lib/pgsql/data/pg_hba.conf.bak || cp /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf.bak
"allow login via username and password in postgresql" echo "allow login via username and password in postgresql"
egrep -v "^#.*$" < /var/lib/pgsql/data/pg_hba.conf.bak | sed 's/ident/trust/g' > /var/lib/pgsql/data/pg_hba.conf egrep -v "^#.*$" < /var/lib/pgsql/data/pg_hba.conf.bak | sed 's/ident/md5/g' > /var/lib/pgsql/data/pg_hba.conf
echo "restarting postgresql server" echo "restarting postgresql server"
${INIT_CMD} restart postgresql ${INIT_CMD} restart postgresql