From 310f0711fac439dcc09481492c4d11533b4039ee Mon Sep 17 00:00:00 2001 From: yubiuser Date: Mon, 21 Jul 2025 13:41:53 +0200 Subject: [PATCH] Group evaluations Co-authored-by: Dan Schaper Signed-off-by: yubiuser --- pihole | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pihole b/pihole index 665c11f5..dabaad5a 100755 --- a/pihole +++ b/pihole @@ -573,7 +573,7 @@ fi # Check if the current user is not root and if the command # requires root. If so, exit with an error message. # 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 " ${COL_GREEN}sudo pihole $*${COL_NC}" exit 1