diff --git a/pkg_postgresql.postinstall b/pkg_postgresql.postinstall index af0d32e..0ff85f8 100644 --- a/pkg_postgresql.postinstall +++ b/pkg_postgresql.postinstall @@ -12,11 +12,17 @@ # GNU General Public License can be found in the file COPYING. # --- SDE-COPYRIGHT-NOTE-END --- +# create propper ownerships on postgresql home and data directory chown postgres:postgres /opt/postgresql chown postgres:postgres /var/opt/postgresql/data/ +# create the initial cluster (WARNING!! this cluster will be SQL_ASCII) su -c postgres "/opt/postgresql/bin/initdb -D /var/opt/postgresql/data" + +# enable the X5 compatibility options sed -i -e "s,^#default_with_oids\ =\ off,default_with_oids\ =\ on," \ -e "s,^#backslash_quote\ =\ safe_encoding,backslash_quote\ =\ on," \ -e "s,^#add_missing_from\ =\ off,add_missing_from\ =\ on," /var/opt/postgresql/data/postgresql.conf +# create the runit link +ln -svnf /etc/opt/postgresql /service/postgresql