mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +00:00
flip reload logic. Do not reload if there are not changes made to blacklist.txt
This commit is contained in:
parent
bd0cc134bf
commit
7fb622638b
1 changed files with 3 additions and 1 deletions
|
@ -35,7 +35,7 @@ basename=pihole
|
|||
piholeDir=/etc/${basename}
|
||||
adList=${piholeDir}/gravity.list
|
||||
blacklist=${piholeDir}/blacklist.txt
|
||||
reload=true
|
||||
reload=false
|
||||
addmode=true
|
||||
verbose=true
|
||||
|
||||
|
@ -76,6 +76,7 @@ AddDomain() {
|
|||
echo -n "::: Adding $1 to blacklist file..."
|
||||
fi
|
||||
echo "$1" >> ${blacklist}
|
||||
reload=true
|
||||
echo " done!"
|
||||
else
|
||||
if ${verbose}; then
|
||||
|
@ -99,6 +100,7 @@ RemoveDomain() {
|
|||
echo "::: Un-blacklisting $dom..."
|
||||
fi
|
||||
echo "$1" | sed 's/\./\\./g' | xargs -I {} perl -i -ne'print unless /'{}'(?!.)/;' ${blacklist}
|
||||
reload=true
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue