X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plc.d%2Fpostgresql;h=536e7c0d319e79b682bca3d50ad2e9f4b23f336f;hb=9878a3da9568b100757b0313933441d2c7b1e7d2;hp=defab8620a46d7442c944a7bb901bdcff52b0313;hpb=5afb8089a48433612fb10bed3c609006882b9859;p=plcapi.git diff --git a/plc.d/postgresql b/plc.d/postgresql index defab862..536e7c0d 100755 --- a/plc.d/postgresql +++ b/plc.d/postgresql @@ -1,6 +1,4 @@ #!/bin/bash -# $Id$ -# $URL$ # # priority: 700 # @@ -85,10 +83,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