Okay, I'm convinced. Please by forgiving with me when it appears I'm not picking up an idea. It doesn't always mean I don't like it. There is just too much stuff going on at the same time...
I pushed a change that should make the -q
really quiet. I intentionally left one exception in there, that is regex errors where the error message is still logged on the terminal.
You may even want to leave the bash ~=
completely out of this:
"regex" )
for list in ${lists}; do
if /usr/bin/pihole-FTL -q regex-test "${domain}" "${list}"; then
printf "%b\n" "${list}";
fi
done;;
to ensure we don't get false-negatives. The regex-test
should be fairly fast.