Make blacklist honour pihole.conf file

This commit is contained in:
Promofaux 2016-04-04 21:08:45 +01:00
parent 7efb17537a
commit 4f08359786
1 changed files with 11 additions and 2 deletions

View File

@ -24,12 +24,15 @@ if [[ $# = 0 ]]; then
fi fi
#globals #globals
blacklist=/etc/pihole/blacklist.txt basename=pihole
adList=/etc/pihole/gravity.list piholeDir=/etc/$basename
adList=$piholeDir/gravity.list
blacklist=$piholeDir/blacklist.txt
reload=true reload=true
addmode=true addmode=true
force=false force=false
versbose=true versbose=true
domList=() domList=()
domToRemoveList=() domToRemoveList=()
@ -42,6 +45,12 @@ piholeIP=${piholeIPCIDR%/*}
modifyHost=false modifyHost=false
# After setting defaults, check if there's local overrides
if [[ -r $piholeDir/pihole.conf ]];then
echo "::: Local calibration requested..."
. $piholeDir/pihole.conf
fi
if [[ -f $piholeIPv6file ]];then if [[ -f $piholeIPv6file ]];then
# If the file exists, then the user previously chose to use IPv6 in the automated installer # If the file exists, then the user previously chose to use IPv6 in the automated installer