mirror of
https://github.com/uklans/cache-domains
synced 2025-06-19 07:52:56 +02:00
Update scripts/create-dnsmasq.sh
Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
This commit is contained in:
parent
06eec88bb7
commit
6a324b0713
@ -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})
|
||||
|
Loading…
Reference in New Issue
Block a user