Tardiba - The Tasmanian Devil Database Server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.3 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: target/tardiba/postgresql.postinstall
  5. # Copyright (C) 2007 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- SDE-COPYRIGHT-NOTE-END ---
  14. # create propper ownerships on postgresql home and data directory
  15. chown postgres:postgres /opt/postgresql
  16. chown postgres:postgres /var/opt/postgresql/data/
  17. # create the initial cluster (WARNING!! this cluster will be SQL_ASCII)
  18. su - postgres -c "/opt/postgresql/bin/initdb -D /var/opt/postgresql/data"
  19. # enable the X5 compatibility options
  20. sed -i -e "s,^#default_with_oids\ =\ off,default_with_oids\ =\ on," \
  21. -e "s,^#backslash_quote\ =\ safe_encoding,backslash_quote\ =\ on," \
  22. -e "s,^#enable_nestloop\ =\ on,enable_nestloop\ =\ off," \
  23. -e "s,^#add_missing_from\ =\ off,add_missing_from\ =\ on," /var/opt/postgresql/data/postgresql.conf
  24. sed -i -e "s,postmaster -i,postmaster -i -o -e," /etc/opt/postgresql/run
  25. # create the runit link
  26. ln -svnf /etc/opt/postgresql /service/postgresql