mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-02-02 17:48:52 +00:00
Merge pull request #1973 from pi-hole/tweak/stop-autowhitelisting
Don't auto-whitelist blocking list domains
This commit is contained in:
commit
220e755596
1 changed files with 0 additions and 19 deletions
19
gravity.sh
19
gravity.sh
|
@ -417,24 +417,6 @@ gravity_SortAndFilterConsolidatedList() {
|
||||||
echo -e " ${INFO} Number of unique domains trapped in the Event Horizon: ${COL_BLUE}${num}${COL_NC}"
|
echo -e " ${INFO} Number of unique domains trapped in the Event Horizon: ${COL_BLUE}${num}${COL_NC}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Whitelist unique blocklist domain sources
|
|
||||||
gravity_WhitelistBlocklistSourceUrls() {
|
|
||||||
local uniqDomains str
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Create array of unique $sourceDomains
|
|
||||||
mapfile -t uniqDomains <<< "$(awk '{ if(!a[$1]++) { print $1 } }' <<< "$(printf '%s\n' "${sourceDomains[@]}")")"
|
|
||||||
|
|
||||||
str="Number of blocklist source domains being added to the whitelist: ${#uniqDomains[@]}"
|
|
||||||
echo -ne " ${INFO} ${str}..."
|
|
||||||
|
|
||||||
# Whitelist $uniqDomains
|
|
||||||
"${PIHOLE_COMMAND}" -w -nr -q ${uniqDomains[*]} &> /dev/null
|
|
||||||
|
|
||||||
echo -e "${OVER} ${INFO} ${str}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Whitelist user-defined domains
|
# Whitelist user-defined domains
|
||||||
gravity_Whitelist() {
|
gravity_Whitelist() {
|
||||||
local num str
|
local num str
|
||||||
|
@ -630,7 +612,6 @@ if [[ "${skipDownload}" == false ]]; then
|
||||||
gravity_SetDownloadOptions
|
gravity_SetDownloadOptions
|
||||||
gravity_ConsolidateDownloadedBlocklists
|
gravity_ConsolidateDownloadedBlocklists
|
||||||
gravity_SortAndFilterConsolidatedList
|
gravity_SortAndFilterConsolidatedList
|
||||||
gravity_WhitelistBlocklistSourceUrls
|
|
||||||
else
|
else
|
||||||
# Gravity needs to modify Blacklist/Whitelist/Wildcards
|
# Gravity needs to modify Blacklist/Whitelist/Wildcards
|
||||||
echo -e " ${INFO} Using cached Event Horizon list..."
|
echo -e " ${INFO} Using cached Event Horizon list..."
|
||||||
|
|
Loading…
Add table
Reference in a new issue