mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-01-11 14:34:44 +00:00
Test if DNS service is listening on local port 53
This commit is contained in:
parent
73741f1518
commit
9170488b0a
1 changed files with 13 additions and 0 deletions
13
pihole
13
pihole
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue