1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-18 06:08:21 +00:00

Using double brackets

This commit is contained in:
Gusher123 2018-08-12 01:50:23 +02:00 committed by GitHub
parent 926b25fd54
commit 1c6c35f861
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -230,15 +230,15 @@ gravity_DownloadBlocklistFromUrl() {
blocked=false
case $BLOCKINGMODE in
"IP-NODATA-AAAA"|"IP")
if [ $(dig "${domain}" +short | grep "${IPV4_ADDRESS}" -c) -ge 1 ]; then
if [[ $(dig "${domain}" +short | grep "${IPV4_ADDRESS}" -c) -ge 1 ]]; then
blocked=true
fi;;
"NXDOMAIN")
if [ $(dig "${domain}" | grep "NXDOMAIN" -c) -ge 1 ]; then
if [[ $(dig "${domain}" | grep "NXDOMAIN" -c) -ge 1 ]]; then
blocked=true
fi;;
"NULL"|"Default (NULL)"|*)
if [ $(dig "${domain}" +short | grep "0.0.0.0" -c) -ge 1 ]; then
if [[ $(dig "${domain}" +short | grep "0.0.0.0" -c) -ge 1 ]]; then
blocked=true
fi;;
esac