From e42a037b7db3a99bc84bda809b9d80e5a0008482 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Wed, 2 Nov 2016 09:28:00 -0700 Subject: [PATCH] Grep -i instead of cat. --- pihole | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pihole b/pihole index 199c0a68..25805b7f 100755 --- a/pihole +++ b/pihole @@ -147,14 +147,14 @@ piholeLogging() { } piholeStatus() { - if [[ $(cat /etc/dnsmasq.d/01-pihole.conf | grep "#addn-hosts=/") ]] ; then + if [[ $(grep -i "^#addn-hosts=/" /etc/dnsmasq.d/01-pihole.conf) ]] ; then #list is commented out if [[ "${1}" == "web" ]] ; then echo 0; else echo "::: Pi-hole blocking is Disabled"; fi - elif [[ $(cat /etc/dnsmasq.d/01-pihole.conf | grep "^addn-hosts=/") ]] ; then + elif [[ $(grep -i "^addn-hosts=/" /etc/dnsmasq.d/01-pihole.conf) ]] ; then #list set if [[ "${1}" == "web" ]] ; then echo 1;