mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-22 06:03:43 +00:00
Remove leftover DNS check via dig as it now only doubles what we already have with getent hosts
Signed-off-by: Christian König <github@yubiuser.dev>
This commit is contained in:
parent
a965afa249
commit
a57d539098
1 changed files with 0 additions and 12 deletions
12
gravity.sh
12
gravity.sh
|
@ -308,18 +308,6 @@ gravity_CheckDNSResolutionAvailable() {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# If the /etc/resolv.conf contains resolvers other than 127.0.0.1 then the local dnsmasq will not be queried and pi.hole is NXDOMAIN.
|
||||
# This means that even though name resolution is working, the getent hosts check fails and the holddown timer keeps ticking and eventually fails
|
||||
# So we check the output of the last command and if it failed, attempt to use dig +short as a fallback
|
||||
if timeout 4 dig +short "${lookupDomain}" &>/dev/null; then
|
||||
if [[ -n "${secs:-}" ]]; then
|
||||
echo -e "${OVER} ${TICK} DNS resolution is now available\\n"
|
||||
fi
|
||||
return 0
|
||||
elif [[ -n "${secs:-}" ]]; then
|
||||
echo -e "${OVER} ${CROSS} DNS resolution is not available"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Determine error output message
|
||||
if pgrep pihole-FTL &>/dev/null; then
|
||||
|
|
Loading…
Reference in a new issue