opscode-cookbooks/postgresql — pull request #63 by lflux (2013-06-28 09:43:41+00:00)
Title: COOK-2939 Set data directory and port correctly for init script

Setting node[:postgresql][:dir] currently has initdb creating the
database in /var/lib/pgsql/data instead of the desired directory.
Fix this by creating /etc/sysconfig file for the service which sets
PGDATA so the init script can pick it up. Also set PGPORT if
node[:postgresql][:config][:port] is set.

This also creates the node[:postgreql][:dir] owned by postgres:postgres.