mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 13:50:17 +00:00
rework status if statments
This commit is contained in:
parent
9056a5a7b6
commit
685b775b68
1 changed files with 4 additions and 4 deletions
8
pihole
8
pihole
|
@ -130,10 +130,10 @@ piholeStatus() {
|
||||||
if [[ $(cat /etc/dnsmasq.d/01-pihole.conf | grep "#addn-hosts=") ]] ; then
|
if [[ $(cat /etc/dnsmasq.d/01-pihole.conf | grep "#addn-hosts=") ]] ; then
|
||||||
if [[ "${1}" == "web" ]] ; then echo 0; else echo "::: pihole is Disabled"; fi
|
if [[ "${1}" == "web" ]] ; then echo 0; else echo "::: pihole is Disabled"; fi
|
||||||
else
|
else
|
||||||
if [[ $(cat /etc/dnsmasq.d/01-pihole.conf | grep "addn-hosts=") ]] ; then
|
if [[ "${1}" == "web" ]] ; then echo 1; else
|
||||||
if [[ "${1}" == "web" ]] ; then echo 1; else echo "::: pihole is Enabled"; fi
|
if [[ $(cat /etc/dnsmasq.d/01-pihole.conf | grep "addn-hosts=") ]] ; then
|
||||||
else
|
echo "::: pihole is Enabled";
|
||||||
if [[ "${1}" == "web" ]] ; then echo 1; else
|
else
|
||||||
echo "::: no hosts file linked to dnsmasq, adding it in enabled state"
|
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
|
echo "addn-hosts=/etc/pihole/gravity.list" >> /etc/dnsmasq.d/01-pihole.conf
|
||||||
restartDNS
|
restartDNS
|
||||||
|
|
Loading…
Reference in a new issue