diff options
-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 |