diff options
author | Andreas Linz | 2016-09-30 12:50:09 +0200 |
---|---|---|
committer | Andreas Linz | 2016-10-06 12:12:50 +0200 |
commit | 581b5d1b111efc70058be429c24ec7be6fcb1ecf (patch) | |
tree | 01d3c6d02f2edb07c327f66af8e8e8cf59274015 | |
parent | eb42ad2390bb5148feff8039bc79d0d6a63cb588 (diff) | |
download | aur-581b5d1b111efc70058be429c24ec7be6fcb1ecf.tar.gz |
Do not delete user and group but print instruxtions on how to so
-rw-r--r-- | caddy-full-bin.install | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/caddy-full-bin.install b/caddy-full-bin.install index 460e1d974f15..b4f19a27f3eb 100644 --- a/caddy-full-bin.install +++ b/caddy-full-bin.install @@ -9,19 +9,17 @@ pre_upgrade() { post_upgrade() { systemctl daemon-reload if [ $(vercmp $2 0.9.3-5) -lt 0 ]; then - userdel -f www-data + cat <<EOF \ +With the package level 0.9.3-5 the caddy user is changed from 'www-data' to 'http'. +You need to update the permissions for your caddy web directory with 'chown -R http:http <web-root>' - # 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 - - echo "Migration guide for caddy <0.9: https://github.com/klingtnet/caddy-AUR/blob/master/README.md" - echo "With the package level 0.9.3-5 the caddy user is changed from 'www-data' to 'http'." - echo "You need to update the permissions for your caddy web directory with 'chown -R http:http <web-root>'" - fi +Instruction to remove the www-data user and group (please check if it is not used in other places): +$ userdel -f www-data +$ groupdel www-data +EOF + + echo "Changing ownership of /etc/ssl/caddy to http:http" + chown -R http:http /etc/ssl/caddy } pre_remove() { |