Remove duplicates in Unbound generation script

#149 introduced a minor regression which included duplicates for the Unbound generation script.
While this does not have a technical impact it may cause confusion for users, this PR will ignore duplicate entries.
This commit is contained in:
Amir Zarrinkafsh 2021-06-15 13:14:49 +10:00
parent e20cec6475
commit 1cbdc8dbf4
No known key found for this signature in database
GPG key ID: ECDB8EF9E77E4EBF

View file

@ -51,7 +51,7 @@ while read entry; do
continue
fi
parsed=$(echo $fileentry | sed -e "s/^\*\.//")
if grep -qx "$parsed" $outputfile; then
if grep -qx " local-zone: \"${parsed}\" redirect" $outputfile; then
continue
fi
if [[ $(head -n 1 $outputfile) != "server:" ]]; then