P.S. You should really merge the 'domain' entries (eliminating duplicates) with the existing NVRAM variable that may
already contain Selective
'WAN' entries and
LAN/
Guest WiFiVPN entries etc., and for the
v384.xx firmware be aware there are NVRAM length limits imposed that may cause unexpected truncation/corruption etc.
For domains, it is now recommended to use IPSETs as sadly your script does not comprehensively identify
all IP subnets/address for a given domain e.g. Netflix.com (see
@Xentrk's method)
#Persistent DNSmasq rules