Add output to `pihole disable` and `pihole enable`

pull/814/head
Promofaux 8 years ago
parent d0826b2c33
commit 82e78fb651

@ -118,8 +118,10 @@ piholeEnable() {
if [[ "${1}" == "0" ]] ; then if [[ "${1}" == "0" ]] ; then
#Disable Pihole #Disable Pihole
sed -i 's/^addn-hosts/#addn-hosts/' /etc/dnsmasq.d/01-pihole.conf sed -i 's/^addn-hosts/#addn-hosts/' /etc/dnsmasq.d/01-pihole.conf
echo "::: Blocking has been disabled!"
else else
#Enable pihole #Enable pihole
echo "::: Blocking has been enabled!"
sed -i 's/^#addn-hosts/addn-hosts/' /etc/dnsmasq.d/01-pihole.conf sed -i 's/^#addn-hosts/addn-hosts/' /etc/dnsmasq.d/01-pihole.conf
fi fi
restartDNS restartDNS
@ -131,14 +133,14 @@ piholeStatus() {
if [[ "${1}" == "web" ]] ; then if [[ "${1}" == "web" ]] ; then
echo 0; echo 0;
else else
echo "::: Pi-hole is Disabled"; echo "::: Pi-hole blocking is Disabled";
fi fi
elif [[ $(cat /etc/dnsmasq.d/01-pihole.conf | grep "addn-hosts=/") ]] ; then elif [[ $(cat /etc/dnsmasq.d/01-pihole.conf | grep "addn-hosts=/") ]] ; then
#list set #list set
if [[ "${1}" == "web" ]] ; then if [[ "${1}" == "web" ]] ; then
echo 1; echo 1;
else else
echo "::: Pi-hole is Enabled"; echo "::: Pi-hole blocking is Enabled";
fi fi
else else
#addn-host not found #addn-host not found

Loading…
Cancel
Save