diff options
author | Andreas Linz | 2016-09-30 11:14:26 +0200 |
---|---|---|
committer | Andreas Linz | 2016-10-06 12:12:50 +0200 |
commit | eb42ad2390bb5148feff8039bc79d0d6a63cb588 (patch) | |
tree | e4779d50ec4cfd773b8edfe28e0f9195e6f641f2 | |
parent | 3f61f7470eba60b7ce0bad8d4cd2add43f55070d (diff) | |
download | aur-eb42ad2390bb5148feff8039bc79d0d6a63cb588.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 ca6086f39a9e..460e1d974f15 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 |