diff --git a/pkg_postgresql.postinstall b/pkg_postgresql.postinstall new file mode 100644 index 0000000..5e56599 --- /dev/null +++ b/pkg_postgresql.postinstall @@ -0,0 +1,22 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: target/tardiba/pkg_postgresql.postinstall +# Copyright (C) 2007 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- SDE-COPYRIGHT-NOTE-END --- + +chown postgres:postgres /opt/postgresql +chown postgres:postgres /var/opt/postgresql/data/ + +su -c postgres "/opt/postgresql/bin/initdb -D /var/opt/postgresql/data" +sed -i "s,#default_with_oids\ =\ off,default_with_oids\ =\ on," +sed -i "s,#backslash_quote\ =\ off,backslash_quote\ =\ on," +sed -i "s,#add_missing_from\ =\ off,add_missing_from\ =\ on," +