mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +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
1 changed files with 5 additions and 1 deletions
|
@ -94,15 +94,19 @@ HandleOther() {
|
|||
}
|
||||
|
||||
ProcessDomainList() {
|
||||
local is_regexlist
|
||||
if [[ "${listType}" == "regex_blacklist" ]]; then
|
||||
# Regex black filter list
|
||||
listname="regex blacklist filters"
|
||||
is_regexlist=true
|
||||
elif [[ "${listType}" == "regex_whitelist" ]]; then
|
||||
# Regex white filter list
|
||||
listname="regex whitelist filters"
|
||||
is_regexlist=true
|
||||
else
|
||||
# Whitelist / Blacklist
|
||||
listname="${listType}"
|
||||
is_regexlist=false
|
||||
fi
|
||||
|
||||
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 ${addmode}; then
|
||||
AddDomain "${dom}" "${listType}"
|
||||
if [[ ! "${listType}" == "regex_"*"list" ]]; then
|
||||
if ! ${is_regexlist}; then
|
||||
RemoveDomain "${dom}" "${listAlt}"
|
||||
fi
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue