summaryrefslogtreecommitdiffstats
path: root/postgresql/post-install
diff options
context:
space:
mode:
Diffstat (limited to 'postgresql/post-install')
-rw-r--r--postgresql/post-install12
1 files changed, 12 insertions, 0 deletions
diff --git a/postgresql/post-install b/postgresql/post-install
new file mode 100644
index 000000000..dd6c07e5b
--- /dev/null
+++ b/postgresql/post-install
@@ -0,0 +1,12 @@
+getent group $newgroup > /dev/null || groupadd -g 41 postgres
+getent passwd $newuser > /dev/null || useradd -c "PostgreSQL Server" \
+-g postgres -d /srv/pgsql/data \
+ -u 41 postgres
+install -v -m700 -d /srv/pgsql/data
+chown -v postgres /srv/pgsql/data
+chmod 700 /srv/pgsql/data
+# su - postgres -c '/usr/bin/initdb -D /srv/pgsql/data'
+
+# su - postgres -c '/usr/bin/postmaster -D /srv/pgsql/data > \
+# /srv/pgsql/data/logfile 2>&1 &'
+