diff options
author | varac <varacanero@zeromail.org> | 2015-09-29 16:19:27 +0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-09-29 10:46:28 -0400 |
commit | 9526f7a877533969e799bcd3b79abb2f20eef5cb (patch) | |
tree | 93d8e7efed85d585bc13d7ed6aa20d644add3061 /debian/soledad-server.postinst | |
parent | d5bf6b606a95c12a1beb18acbe2716253d9d093f (diff) |
[pkg] Also install the soledad user and group on package install
- Resolves: https://leap.se/code/issues/7499
Diffstat (limited to 'debian/soledad-server.postinst')
-rw-r--r-- | debian/soledad-server.postinst | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/debian/soledad-server.postinst b/debian/soledad-server.postinst index 19a2b888..55dc0d14 100644 --- a/debian/soledad-server.postinst +++ b/debian/soledad-server.postinst @@ -2,10 +2,26 @@ export PATH=/bin:/usr/bin:/sbin:/usr/sbin -id soledad-admin > /dev/null +# create soledad group +getent group soledad > /dev/null RET=$? if [ ! $RET -eq 0 ]; then - adduser --system soledad-admin --home /srv/leap/ --disabled-password --shell /bin/sh --ingroup nogroup + addgroup --system soledad fi +# create soledad user +id soledad > /dev/null 2>&1 +RET=$? + +if [ ! $RET -eq 0 ]; then + adduser --system soledad --no-create-home --home /srv/leap/ --ingroup soledad +fi + +# create soledad-admin user +id soledad-admin > /dev/null 2>&1 +RET=$? + +if [ ! $RET -eq 0 ]; then + adduser --system soledad-admin --no-create-home --home /srv/leap/ --ingroup soledad +fi |