X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=plc.d%2Fpostgresql;h=d1c56d4d4e05596a263521b8ad021b26026ec33f;hb=fe81b2c91b436b1882f63023413c7f51b29538ed;hp=defab8620a46d7442c944a7bb901bdcff52b0313;hpb=c652f3ad9decac58ea08c6b8e6345f70a34399f4;p=plcapi.git diff --git a/plc.d/postgresql b/plc.d/postgresql index defab86..d1c56d4 100755 --- a/plc.d/postgresql +++ b/plc.d/postgresql @@ -85,10 +85,14 @@ case "$1" in # PostgreSQL 7.x uses tcpip_socket. if grep -q listen_addresses $postgresql_conf ; then sed -i -e '/^listen_addresses/d' $postgresql_conf - echo "listen_addresses = '*'" >>$postgresql_conf - elif grep -q tcpip_socket $postgresql_conf ; then - sed -i -e '/^tcpip_socket/d' $postgresql_conf - echo "tcpip_socket = true" >>$postgresql_conf + echo "listen_addresses = '*'" >> $postgresql_conf + # tweak timezone to be 'UTC' + sed -i -e '/^timezone=/d' $postgresql_conf + echo "timezone='UTC'" >> $postgresql_conf + else + dialog "PostgreSQL <= 7.x - not supported" + /bin/false + check fi # Disable access to all DBs from all hosts