From 6a324b07136bcf6cac717b951c21e14a60aece73 Mon Sep 17 00:00:00 2001 From: Travis Snoozy Date: Sun, 26 Mar 2023 22:18:49 -0700 Subject: [PATCH] Update scripts/create-dnsmasq.sh Co-authored-by: Amir Zarrinkafsh --- scripts/create-dnsmasq.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/create-dnsmasq.sh b/scripts/create-dnsmasq.sh index cc6d27a..46483ac 100755 --- a/scripts/create-dnsmasq.sh +++ b/scripts/create-dnsmasq.sh @@ -52,12 +52,12 @@ while read -r entry; do fi parsed=$(echo ${fileentry} | sed -e "s/^\*\.//") for i in ${cacheip}; do - if ! grep -qx "local=/${parsed}/" "${outputfile}"; then - echo "local=/${parsed}/" >> "${outputfile}" - fi if ! grep -qx "address=/${parsed}/${i}" "${outputfile}"; then echo "address=/${parsed}/${i}" >> "${outputfile}" fi + if ! grep -qx "local=/${parsed}/" "${outputfile}"; then + echo "local=/${parsed}/" >> "${outputfile}" + fi done done <<< $(cat ${basedir}/${filename} | sort); done <<< $(jq -r ".cache_domains[${entry}].domain_files[$fileid]" ${path})