Changed shebangs to be portable to RHEL 6 systems (hopefully everything ...

...else).

Added OS detection for freebsd/redhat to use proper init scripts for pg and
for the default pg user.