Skip to content

Commit

Permalink
dietpi-patches: replace "usermod -r" with gpasswd
Browse files Browse the repository at this point in the history
"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.
  • Loading branch information
MichaIng committed Feb 25, 2025
1 parent 01357c2 commit 86fefc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 86fefc0

Please sign in to comment.