summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Linz2016-09-30 12:50:09 +0200
committerAndreas Linz2016-09-30 12:54:14 +0200
commit6b7e5fd10e0e0c478cee2b40c18a087227d61f35 (patch)
treef6ae5d1da01ec3d5f5d44beff68e4d69d5780498
parent1fe697f35bc3ed302170cc4dfae8e9ba138fe4be (diff)
downloadaur-6b7e5fd10e0e0c478cee2b40c18a087227d61f35.tar.gz
Do not delete user and group but print instruxtions on how to so
-rw-r--r--caddy-full-bin.install22
1 files changed, 10 insertions, 12 deletions
diff --git a/caddy-full-bin.install b/caddy-full-bin.install
index cf556269435..c931506c2e4 100644
--- a/caddy-full-bin.install
+++ b/caddy-full-bin.install
@@ -9,20 +9,18 @@ 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
-
+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
-
- 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
-}
+fi
pre_remove() {
systemctl stop caddy