From 86fefc07650f2c5fb44d0898ef140321c395f676 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 25 Feb 2025 21:33:19 +0100 Subject: [PATCH] dietpi-patches: replace "usermod -r" with gpasswd "usermod -r" is available only from Bookworm on. To be compatible with Bullseye, we switch to gpasswd. It however fails, if the user is not actually member of the group anymore, hence adjust the test as well. --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index dce20fbf86..f6f5ab3d3c 100755 --- a/.update/patches +++ b/.update/patches @@ -2132,7 +2132,7 @@ Patch_9_11() [[ -d '/etc/nginx/sites-dietpi' ]] && G_EXEC rm -f /etc/nginx/sites-dietpi/dietpi-pihole* # Remove www-data user from pihole group - getent group pihole > /dev/null && G_EXEC usermod -rG pihole www-data + getent group pihole | grep -Eq ':www-data(,|$)' && G_EXEC gpasswd -d www-data pihole # Change web UI port to 8089 to avoid conflict with webservers and other web applications G_EXEC pihole-FTL --config webserver.port 8089