mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-24 15:13:42 +00:00
Account for domain that does not resolve
This commit is contained in:
parent
32ab61ed6d
commit
ca66849876
1 changed files with 8 additions and 0 deletions
|
@ -21,6 +21,8 @@ verifyHostAddress() {
|
|||
status="pi-hole IP"
|
||||
elif [[ $ip =~ (^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.) ]]; then
|
||||
status="RFC1918"
|
||||
elif [[ "$ip" == "" ]]; then
|
||||
status="empty"
|
||||
else
|
||||
status=$ip
|
||||
fi
|
||||
|
@ -65,6 +67,8 @@ do
|
|||
echo -e "\tFailed - $name resolves to your pi-hole ($piholeIP)"
|
||||
elif [[ "$status" == "RFC1918" ]]; then
|
||||
echo -e "\tFailed - $name resolves to a non-routable address ($ip)"
|
||||
elif [[ "$status" == "empty" ]]; then
|
||||
echo -e"\tFailed - $name could not be resolved ($ip)"
|
||||
else
|
||||
echo -e "\tSuccess - $name resolves to a public IP address ($ip)"
|
||||
fi
|
||||
|
@ -79,6 +83,8 @@ do
|
|||
echo -e "\tFailed - $name resolves to your pi-hole ($piholeIP)"
|
||||
elif [[ "$status" == "RFC1918" ]]; then
|
||||
echo -e "\tFailed - $name resolves to a non-routable address ($ip)"
|
||||
elif [[ "$status" == "empty" ]]; then
|
||||
echo -e"\tFailed - $name could not be resolved ($ip)"
|
||||
else
|
||||
echo -e "\tSuccess - $name resolves to a public IP address ($ip)"
|
||||
fi
|
||||
|
@ -93,6 +99,8 @@ do
|
|||
echo -e "\tSuccess - $name resolves to your pi-hole ($ip)"
|
||||
elif [[ "$status" == "RFC1918" ]]; then
|
||||
echo -e "\tVerify - $name resolves to a non-routable address that is not your pi-hole server ($ip)"
|
||||
elif [[ "$status" == "empty" ]]; then
|
||||
echo -e"\tFailed - $name could not be resolved ($ip)"
|
||||
else
|
||||
echo -e "\tFailed - $name resolves to a public IP address ($ip)"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue