Group evaluations

Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net>
Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
yubiuser 2025-07-21 13:41:53 +02:00 committed by Christian König
parent 9580dc6560
commit 310f0711fa
No known key found for this signature in database

2
pihole
View File

@ -573,7 +573,7 @@ fi
# Check if the current user is not root and if the command # Check if the current user is not root and if the command
# requires root. If so, exit with an error message. # requires root. If so, exit with an error message.
# Add an exception for the user "pihole" to allow the webserver running gravity # Add an exception for the user "pihole" to allow the webserver running gravity
if [[ $EUID -ne 0 && ${USER} != "pihole" && need_root -eq 1 ]];then if [[ ( $EUID -ne 0 && ${USER} != "pihole" ) && need_root -eq 1 ]]; then
echo -e " ${CROSS} The Pi-hole command requires root privileges, try:" echo -e " ${CROSS} The Pi-hole command requires root privileges, try:"
echo -e " ${COL_GREEN}sudo pihole $*${COL_NC}" echo -e " ${COL_GREEN}sudo pihole $*${COL_NC}"
exit 1 exit 1