mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
improve comments
This commit is contained in:
parent
60142cd960
commit
9e4e1d1cb2
1 changed files with 3 additions and 1 deletions
|
@ -185,7 +185,7 @@ gravity_Schwarzchild() {
|
||||||
}
|
}
|
||||||
|
|
||||||
gravity_Blacklist() {
|
gravity_Blacklist() {
|
||||||
# Append blacklist entries if they exist
|
# Append blacklist entries to eventHorizon if they exist
|
||||||
if [[ -f "${blacklistFile}" ]]; then
|
if [[ -f "${blacklistFile}" ]]; then
|
||||||
numBlacklisted=$(wc -l < "${blacklistFile}")
|
numBlacklisted=$(wc -l < "${blacklistFile}")
|
||||||
plural=; [[ "$numBlacklisted" != "1" ]] && plural=s
|
plural=; [[ "$numBlacklisted" != "1" ]] && plural=s
|
||||||
|
@ -215,11 +215,13 @@ gravity_Whitelist() {
|
||||||
# Ensure adlist domains are in whitelist.txt
|
# Ensure adlist domains are in whitelist.txt
|
||||||
${whitelistScript} -nr -q "${urls[@]}" > /dev/null
|
${whitelistScript} -nr -q "${urls[@]}" > /dev/null
|
||||||
|
|
||||||
|
# Check whitelist.txt exists.
|
||||||
if [[ -f "${whitelistFile}" ]]; then
|
if [[ -f "${whitelistFile}" ]]; then
|
||||||
# Remove anything in whitelist.txt from the Event Horizon
|
# Remove anything in whitelist.txt from the Event Horizon
|
||||||
numWhitelisted=$(wc -l < "${whitelistFile}")
|
numWhitelisted=$(wc -l < "${whitelistFile}")
|
||||||
plural=; [[ "$numWhitelisted" != "1" ]] && plural=s
|
plural=; [[ "$numWhitelisted" != "1" ]] && plural=s
|
||||||
echo -n "::: Whitelisting $numWhitelisted domain${plural}..."
|
echo -n "::: Whitelisting $numWhitelisted domain${plural}..."
|
||||||
|
#print everything from preEventHorizon into eventHorizon EXCEPT domains in whitelist.txt
|
||||||
grep -F -x -v -f ${whitelistFile} ${piholeDir}/${preEventHorizon} > ${piholeDir}/${eventHorizon}
|
grep -F -x -v -f ${whitelistFile} ${piholeDir}/${preEventHorizon} > ${piholeDir}/${eventHorizon}
|
||||||
echo " done!"
|
echo " done!"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue