Grep -i instead of cat.

This commit is contained in:
Dan Schaper 2016-11-02 09:28:00 -07:00
parent fe18d69b65
commit e42a037b7d

4
pihole
View file

@ -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;