What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Entware Pi-hole directly on the router? Yes!

You could try modifying /opt/bin/pihole by inserting debug info in those specific lines:

Code:
# In the case of alpine running in a container, the USER variable appears to be blank
# which prevents the next trap from working correctly. Set it by running whoami
if [[ -z ${USER} ]]; then
  USER=$(whoami)
fi

echo "USER = $USER"
echo "EUID = $EUID"
echo "UID = $UID"
echo "SHELL = $SHELL"
echo "PWD = $PWD"
echo "HOME = $HOME"
echo "PPID = $PPID"

# 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" ) && -n "${need_root}" ]]; then
  echo -e "  ${CROSS} This Pi-hole command requires root privileges, try:"
  echo -e "      ${COL_GREEN}sudo pihole $*${COL_NC}"
  exit 1
fi

And retrying from the web UI and posting the output.
For me this outputs pihole user correctly.
 
Last edited:
Hmmm...I'm using a merlin-flashed AC86 as a wired switch on my network. amtm on it is up to date and I could easily add a drive for a swap/entware to run this script/package, since I haven't put any ad-blocking etc on my main router when it was commissioned...
do I need an experiment/source of stress and amusement? I may just...
 
Pi-hole released few patch releases so the package got updated once again: 2025.10.28-1
@heslo gravity update issue should be gone in this one
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top