diff options
author | root <root@rshg054.dnsready.net> | 2012-09-17 00:03:15 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-09-17 00:03:15 +0000 |
commit | d1d75c37c446dfbe9cbae503300e17f2973dbf44 (patch) | |
tree | b456fdc00f58cc15c7faf27ed12dfc9a0f8741b4 /testing/postgresql/postgresql.install | |
parent | 50634781b5673a447953e357a63baa66515ec868 (diff) |
Mon Sep 17 00:03:15 UTC 2012
Diffstat (limited to 'testing/postgresql/postgresql.install')
-rw-r--r-- | testing/postgresql/postgresql.install | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/testing/postgresql/postgresql.install b/testing/postgresql/postgresql.install index c52432271..7b73f6fa9 100644 --- a/testing/postgresql/postgresql.install +++ b/testing/postgresql/postgresql.install @@ -2,9 +2,13 @@ post_install() { if [ ! -d '/var/lib/postgres' ]; then mkdir -p '/var/lib/postgres' fi - 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 /bin/bash postgres - passwd -l postgres >/dev/null + if ! getent group postgres >/dev/null; then + groupadd -g 88 postgres + fi + if ! getent passwd postgres >/dev/null; then + useradd -c 'PostgreSQL user' -u 88 -g postgres -d '/var/lib/postgres' -s /bin/bash postgres + passwd -l postgres >/dev/null + fi } post_upgrade() { |