Parse: always force-include custom hosts to the list, regardless of reachability

This commit is contained in:
ValdikSS 2025-02-08 18:00:58 +03:00
parent f8a4d080fa
commit c150c9535e

View File

@ -22,13 +22,13 @@ sort -u temp/include-hosts.txt result/hostlist_original.txt > temp/hostlist_orig
awk -F ';' '{split($1, a, /\|/); for (i in a) {print a[i]";"$2}}' temp/list.csv | \
grep -f config/exclude-hosts-by-ips-dist.txt | awk -F ';' '{print $2}' >> temp/exclude-hosts.txt
awk -f scripts/getzones.awk temp/hostlist_original_with_include.txt | grep -v -F -x -f temp/exclude-hosts.txt | sort -u > result/hostlist_zones.txt
awk -f scripts/getzones.awk temp/hostlist_original_with_include.txt | grep -v -F -x -f temp/exclude-hosts.txt | cat - temp/include-hosts.txt | sort -u > result/hostlist_zones.txt
if [[ "$RESOLVE_NXDOMAIN" == "yes" ]];
then
timeout 2h scripts/resolve-dns-nxdomain.py result/hostlist_zones.txt > temp/nxdomain-exclude-hosts.txt
cat temp/nxdomain-exclude-hosts.txt >> temp/exclude-hosts.txt
awk -f scripts/getzones.awk temp/hostlist_original_with_include.txt | grep -v -F -x -f temp/exclude-hosts.txt | sort -u > result/hostlist_zones.txt
awk -f scripts/getzones.awk temp/hostlist_original_with_include.txt | grep -v -F -x -f temp/exclude-hosts.txt | cat - temp/include-hosts.txt | sort -u > result/hostlist_zones.txt
fi
# Generate a list of IP addresses