about summary refs log tree commit diff stats
path: root/tools/scripts/install-postgres.sh
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2016-10-03 22:48:38 +0100
committerSilvino Silva <silvino@bk.ru>2016-10-03 22:49:20 +0100
commitc30b14dbcfb60418a0d7fd050a096c9bc20a380b (patch)
tree0aa945da5a98a0a1d837ff55338800d0a46db820 /tools/scripts/install-postgres.sh
parentcf0657e1b62b59e2f54bc0cb88870c4db1e36769 (diff)
parente6d81cddaba6e3a1583a193ddf1b7405fbdd9889 (diff)
downloaddoc-c30b14dbcfb60418a0d7fd050a096c9bc20a380b.tar.gz
Release 0.2.3
Diffstat (limited to 'tools/scripts/install-postgres.sh')
-rw-r--r--tools/scripts/install-postgres.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/scripts/install-postgres.sh b/tools/scripts/install-postgres.sh
new file mode 100644
index 0000000..06666e0
--- /dev/null
+++ b/tools/scripts/install-postgres.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+. `dirname $0`/config-install.sh
+
+prt-get depinst postgresql
+
+cp -R $CONF_DIR/etc/rc.d/postgresql /etc/rc.d/
+
+mkdir /srv/pgsql/
+touch /var/log/postgresql
+chown postgres:postgres /srv/pgsql /var/log/postgresql
+
+sudo -u postgres initdb -D /srv/pgsql/data
+
+cp $CONF_DIR/srv/pgsql/data/pg_hba.conf /srv/pgsql/data/
+chown postgres:postgres /srv/pgsql/data/pg_hba.conf