use pihole instead of direct path

This commit is contained in:
tuplink 2016-10-20 06:29:53 -04:00
parent 74bfcea6a8
commit 41056ace02

View file

@ -33,7 +33,6 @@ fi
#globals #globals
basename=pihole basename=pihole
piholeDir=/etc/${basename} piholeDir=/etc/${basename}
blacklistScript=/opt/pihole/blacklist.sh
adList=${piholeDir}/gravity.list adList=${piholeDir}/gravity.list
whitelist=${piholeDir}/whitelist.txt whitelist=${piholeDir}/whitelist.txt
reload=true reload=true
@ -100,8 +99,7 @@ RemoveDomain(){
fi fi
else else
echo "$1" | sed 's/\./\\./g' | xargs -I {} perl -i -ne'print unless /'{}'(?!.)/;' ${whitelist} echo "$1" | sed 's/\./\\./g' | xargs -I {} perl -i -ne'print unless /'{}'(?!.)/;' ${whitelist}
#Blacklist unwhitelisted pihole -g
${blacklistScript} $1
fi fi
} }