summaryrefslogtreecommitdiff
path: root/extra/postgresql/postgresql.install
diff options
context:
space:
mode:
authorroot <root@rshg047.dnsready.net>2011-04-19 04:14:07 +0000
committerroot <root@rshg047.dnsready.net>2011-04-19 04:14:07 +0000
commit8f4f6fea0e8f06647b3e06c003069c93b5b033b4 (patch)
treeb1c2eae862fab1f19ba291dcb5569383a01df12a /extra/postgresql/postgresql.install
parent3299b3302e12f5a2b0e85dd625de99454c47664d (diff)
Tue Apr 19 04:14:07 UTC 2011
Diffstat (limited to 'extra/postgresql/postgresql.install')
-rw-r--r--extra/postgresql/postgresql.install14
1 files changed, 14 insertions, 0 deletions
diff --git a/extra/postgresql/postgresql.install b/extra/postgresql/postgresql.install
new file mode 100644
index 000000000..4a6f9b848
--- /dev/null
+++ b/extra/postgresql/postgresql.install
@@ -0,0 +1,14 @@
+post_install() {
+ getent group postgres >/dev/null || groupadd -g 88 postgres
+ getent passwd postgres >/dev/null || useradd -c 'PostgreSQL user' -u 88 -g postgres -d '/var/lib/postgres' -s /sbin/nologin postgres
+ passwd -l postgres >/dev/null
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ getent passwd postgres >/dev/null && userdel postgres
+ getent group postgres >/dev/null && groupdel postgres
+}