mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Fix array of unique $sourceDomains
This commit is contained in:
parent
34ae4844fa
commit
d3073e5e23
1 changed files with 1 additions and 3 deletions
|
@ -388,9 +388,7 @@ gravity_WhitelistBLD() {
|
|||
echo -ne " ${INFO} ${str}..."
|
||||
|
||||
# Create array of unique $sourceDomains
|
||||
# Disable SC2046 as quoting will only return first domain
|
||||
# shellcheck disable=SC2046
|
||||
read -r -a uniqDomains <<< $(awk '{ if(!a[$1]++) { print $1 } }' <<< "$(printf '%s\n' "${sourceDomains[@]}")")
|
||||
mapfile -t uniqDomains <<< "$(awk '{ if(!a[$1]++) { print $1 } }' <<< "$(printf '%s\n' "${sourceDomains[@]}")")"
|
||||
|
||||
${WHITELIST_COMMAND} -nr -q "${uniqDomains[*]}" > /dev/null
|
||||
|
||||
|
|
Loading…
Reference in a new issue