Enable PostgreSQL 8+ remote access without password
cat>>$PGSQL_DATA/pg_hba.conf <<EOF
host all all 0/0 trust
EOFsed-i"s|.*listen_addresses.*|listen_addresses = '*'|"$PGSQL_DATA/postgresql.conf
# Add following rule to iptables if needed.
iptables -A INPUT -p tcp --dport5432-j ACCEPT