ports/contrib (3.2): postgresql: make post-install idempotent
18 Mar
2016
18 Mar
'16
10:12 p.m.
commit 3528c446fb5d17f498a6cd74f26bfe65fdc2efbd Author: Thomas Penteker <thomas.penteker@siemens.com> Date: Fri Mar 18 23:11:58 2016 +0100 postgresql: make post-install idempotent diff --git a/postgresql/post-install b/postgresql/post-install index fe0e066..8d2481b 100755 --- a/postgresql/post-install +++ b/postgresql/post-install @@ -8,6 +8,8 @@ ID=42 getent group ${GROUP} >/dev/null || groupadd -r ${GROUP} getent passwd ${USER} >/dev/null || useradd -u $ID -d ${HOME} -g ${GROUP} -s /bin/false ${USER} +test -d ${HOME} && exit 0 + install -d -o ${USER} -g ${GROUP} ${HOME} su -s /bin/sh -c "pg_ctl -D ${HOME} initdb" ${USER}
3225
Age (days ago)
3225
Last active (days ago)
0 comments
1 participants
participants (1)
-
crux@crux.nu