Commit 2d83a9772c8243ea003f6e68032ad0d2a7bac864

Authored by Sergio Oliveira
1 parent b8509f5b

Added pg_hba rule to allow postgres user to connect

Showing 1 changed file with 4 additions and 3 deletions   Show diff stats
vagrant/centos.sh
@@ -49,10 +49,11 @@ chown vagrant:vagrant /etc/colab @@ -49,10 +49,11 @@ chown vagrant:vagrant /etc/colab
49 49
50 ## Configuring postgres 50 ## Configuring postgres
51 if [ ! -f /var/lib/pgsql/data/pg_hba.conf.bkp ]; then 51 if [ ! -f /var/lib/pgsql/data/pg_hba.conf.bkp ]; then
  52 + service postgresql initdb
52 cp /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf.bkp 53 cp /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf.bkp
53 - echo "host all colab 127.0.0.1/32 md5" > /var/lib/pgsql/data/pg_hba.conf  
54 - echo "host all colab ::1/128 md5" >> /var/lib/pgsql/data/pg_hba.conf  
55 - service postgresql initdb &> /dev/null 54 + echo "local all all ident" > /var/lib/pgsql/data/pg_hba.conf
  55 + echo "host all all 127.0.0.1/32 md5" >> /var/lib/pgsql/data/pg_hba.conf
  56 + echo "host all all ::1/128 md5" >> /var/lib/pgsql/data/pg_hba.conf
56 service postgresql restart 57 service postgresql restart
57 fi 58 fi
58 59