1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-17 21:59:55 +00:00

rework status if statments

This commit is contained in:
Tommy Huff 2016-10-20 11:24:34 -04:00
parent 9056a5a7b6
commit 685b775b68

8
pihole
View File

@ -130,10 +130,10 @@ piholeStatus() {
if [[ $(cat /etc/dnsmasq.d/01-pihole.conf | grep "#addn-hosts=") ]] ; then
if [[ "${1}" == "web" ]] ; then echo 0; else echo "::: pihole is Disabled"; fi
else
if [[ $(cat /etc/dnsmasq.d/01-pihole.conf | grep "addn-hosts=") ]] ; then
if [[ "${1}" == "web" ]] ; then echo 1; else echo "::: pihole is Enabled"; fi
else
if [[ "${1}" == "web" ]] ; then echo 1; else
if [[ "${1}" == "web" ]] ; then echo 1; else
if [[ $(cat /etc/dnsmasq.d/01-pihole.conf | grep "addn-hosts=") ]] ; then
echo "::: pihole is Enabled";
else
echo "::: no hosts file linked to dnsmasq, adding it in enabled state"
echo "addn-hosts=/etc/pihole/gravity.list" >> /etc/dnsmasq.d/01-pihole.conf
restartDNS