mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Merge pull request #1910 from pi-hole/fix/BinaryFileLineInGravity
Potential fix for #1909
This commit is contained in:
commit
9f2ce0e296
@ -330,7 +330,7 @@ gravity_ParseFileIntoDomains() {
|
|||||||
}' "${source}" > "${destination}.exceptionsFile.tmp"
|
}' "${source}" > "${destination}.exceptionsFile.tmp"
|
||||||
|
|
||||||
# Remove exceptions
|
# Remove exceptions
|
||||||
grep -F -x -v -f "${destination}.exceptionsFile.tmp" "${destination}" > "${source}"
|
comm -23 "${destination}" <(sort "${destination}.exceptionsFile.tmp") > "${source}"
|
||||||
mv "${source}" "${destination}"
|
mv "${source}" "${destination}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -449,7 +449,7 @@ gravity_Whitelist() {
|
|||||||
echo -ne " ${INFO} ${str}..."
|
echo -ne " ${INFO} ${str}..."
|
||||||
|
|
||||||
# Print everything from preEventHorizon into whitelistMatter EXCEPT domains in $whitelistFile
|
# Print everything from preEventHorizon into whitelistMatter EXCEPT domains in $whitelistFile
|
||||||
grep -F -x -v -f "${whitelistFile}" "${piholeDir}/${preEventHorizon}" > "${piholeDir}/${whitelistMatter}"
|
comm -23 "${piholeDir}/${preEventHorizon}" <(sort "${whitelistFile}") > "${piholeDir}/${whitelistMatter}"
|
||||||
|
|
||||||
echo -e "${OVER} ${INFO} ${str}"
|
echo -e "${OVER} ${INFO} ${str}"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user