|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
#
|
|
# Filename: target/tardiba/postgres.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 ---
|
|
|
|
# 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
|