diff options
author | Andreas Linz | 2016-09-30 11:14:26 +0200 |
---|---|---|
committer | Andreas Linz | 2016-09-30 11:14:26 +0200 |
commit | bd60ccef5de444f8db8d315571838452ded30db4 (patch) | |
tree | af033208a7386d648ab0d7d9b9b422520fb75bed | |
parent | 2af0c3ecff8f7986d6a68b4306762cca66a89d25 (diff) | |
download | aur-bd60ccef5de444f8db8d315571838452ded30db4.tar.gz |
Only remove group `www-data` if no other user is part of it
Thanks to kseistrup for spotting this issue.
-rw-r--r-- | caddy-full-bin.install | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/caddy-full-bin.install b/caddy-full-bin.install index 738ba67b6cda..cf5562694353 100644 --- a/caddy-full-bin.install +++ b/caddy-full-bin.install @@ -10,7 +10,11 @@ post_upgrade() { systemctl daemon-reload if [ $(vercmp $2 0.9.3-5) -lt 0 ]; then userdel -f www-data - groupdel www-data + + # only remove group if no other users are part of it + if [ -z "$(getent group www-data | sed 's/.*://')" ]; then + groupdel www-data + fi chown -R http:http /etc/ssl/caddy |