1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-18 14:18:15 +00:00

Merge pull request #1051 from pi-hole/fix/status

Test if DNS service is listening on local port 53 when reporting status
This commit is contained in:
DL6ER 2016-12-28 20:47:37 +01:00 committed by GitHub
commit 18d1c98f08

13
pihole
View File

@ -185,6 +185,19 @@ piholeLogging() {
}
piholeStatus() {
if [[ $(netstat -plnt | grep -c ':53 ') > 0 ]]; then
if [[ "${1}" != "web" ]] ; then
echo "::: DNS service is running"
fi
else
if [[ "${1}" == "web" ]] ; then
echo "-1";
else
echo "::: DNS service is NOT running"
fi
return
fi
if [[ $(grep -i "^#addn-hosts=/" /etc/dnsmasq.d/01-pihole.conf) ]] ; then
#list is commented out
if [[ "${1}" == "web" ]] ; then