mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
Only check once for if this is a regex list or not.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
a95b473417
commit
09190c1735
@ -94,15 +94,19 @@ HandleOther() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ProcessDomainList() {
|
ProcessDomainList() {
|
||||||
|
local is_regexlist
|
||||||
if [[ "${listType}" == "regex_blacklist" ]]; then
|
if [[ "${listType}" == "regex_blacklist" ]]; then
|
||||||
# Regex black filter list
|
# Regex black filter list
|
||||||
listname="regex blacklist filters"
|
listname="regex blacklist filters"
|
||||||
|
is_regexlist=true
|
||||||
elif [[ "${listType}" == "regex_whitelist" ]]; then
|
elif [[ "${listType}" == "regex_whitelist" ]]; then
|
||||||
# Regex white filter list
|
# Regex white filter list
|
||||||
listname="regex whitelist filters"
|
listname="regex whitelist filters"
|
||||||
|
is_regexlist=true
|
||||||
else
|
else
|
||||||
# Whitelist / Blacklist
|
# Whitelist / Blacklist
|
||||||
listname="${listType}"
|
listname="${listType}"
|
||||||
|
is_regexlist=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for dom in "${domList[@]}"; do
|
for dom in "${domList[@]}"; do
|
||||||
@ -115,7 +119,7 @@ ProcessDomainList() {
|
|||||||
# if delmode then remove from desired list but do not add to the other
|
# if delmode then remove from desired list but do not add to the other
|
||||||
if ${addmode}; then
|
if ${addmode}; then
|
||||||
AddDomain "${dom}" "${listType}"
|
AddDomain "${dom}" "${listType}"
|
||||||
if [[ ! "${listType}" == "regex_"*"list" ]]; then
|
if ! ${is_regexlist}; then
|
||||||
RemoveDomain "${dom}" "${listAlt}"
|
RemoveDomain "${dom}" "${listAlt}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user