diff -Nur -x '*.orig' -x '*.rej' smeserver-postgresql-0.0.1/root/etc/e-smith/templates/var/lib/pgsql/data/postgresql.conf/tcpip_socket mezzanine_patched_smeserver-postgresql-0.0.1/root/etc/e-smith/templates/var/lib/pgsql/data/postgresql.conf/tcpip_socket --- smeserver-postgresql-0.0.1/root/etc/e-smith/templates/var/lib/pgsql/data/postgresql.conf/tcpip_socket 2007-09-11 18:51:57.000000000 -0400 +++ mezzanine_patched_smeserver-postgresql-0.0.1/root/etc/e-smith/templates/var/lib/pgsql/data/postgresql.conf/tcpip_socket 2007-09-11 18:51:33.000000000 -0400 @@ -1,13 +1,21 @@ { my $local = $postgresql{LocalNetworkingOnly} || 'yes'; + my $access = $postgresql{access} || 'localhost'; if (scalar ) { $OUT = "tcpip_socket = "; $OUT .= ($local eq 'yes') ? 'false' : 'true'; + unless ($access eq 'public') + { + $OUT .= "\nvirtual_host = "; + $OUT .= ($access eq 'private') ? "$LocalIP" : '127.0.0.1'; + } } else { $OUT = "listen_addresses = "; - $OUT .= ($local eq 'yes') ? 'localhost' : "127.0.0.1,$LocalIP"; + $OUT .= ($local eq 'yes') ? 'localhost' : + ($access eq 'public') ? '*' : + ($access eq 'private') ? "127.0.0.1,$LocalIP" : '127.0.0.1'; } }