mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-07-30 17:14:16 +02:00
Signed-off-by: Christian König <github@yubiuser.dev>
This commit is contained in:
parent
ae048201a2
commit
3c52ce98d4
3
pihole
3
pihole
@ -572,7 +572,8 @@ fi
|
||||
|
||||
# Check if the current user is not root and if the command
|
||||
# requires root. If so, exit with an error message.
|
||||
if [[ $EUID -ne 0 && need_root -eq 1 ]];then
|
||||
# Add an exception for the user "pihole" to allow the webserver running gravity
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user