mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 13:50:17 +00:00
Build array of active domains to concatenate
Fix #86 Builds an array of active domains, and then loops through that list to pick files to concatenate after truncating Matter.
This commit is contained in:
parent
e2b518568e
commit
20399b8262
1 changed files with 7 additions and 2 deletions
|
@ -113,6 +113,7 @@ do
|
|||
|
||||
# Save the file as list.#.domain
|
||||
saveLocation=$piholeDir/list.$i.$domain.$justDomainsExtension
|
||||
activeDomains[$i]=$saveLocation
|
||||
|
||||
agent="Mozilla/10.0"
|
||||
|
||||
|
@ -140,9 +141,13 @@ done
|
|||
# Schwarzchild - aggregate domains to one list and add blacklisted domains
|
||||
function gravity_Schwarzchild() {
|
||||
|
||||
# Find all files with the .domains extension and compile them into one file and remove CRs
|
||||
# Find all active domains and compile them into one file and remove CRs
|
||||
echo "** Aggregating list of domains..."
|
||||
find $piholeDir/ -type f -name "*.$justDomainsExtension" -exec cat {} \; | tr -d '\r' > $piholeDir/$matter
|
||||
truncate -s 0 $piholeDir/$matter
|
||||
for i in "${activeDomains[@]}"
|
||||
do
|
||||
cat $i |tr -d '\r' >> $piholeDir/$matter
|
||||
done
|
||||
|
||||
# Append blacklist entries if they exist
|
||||
if [[ -r $blacklist ]];then
|
||||
|
|
Loading…
Reference in a new issue