mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Addresses #313
path to white and blacklist scripts moved to variables and updated to include full path
This commit is contained in:
parent
3c801e5b91
commit
3a887af513
1 changed files with 4 additions and 2 deletions
|
@ -31,6 +31,8 @@ piholeIPv6file=/etc/pihole/.useIPv6
|
||||||
|
|
||||||
adListFile=/etc/pihole/adlists.list
|
adListFile=/etc/pihole/adlists.list
|
||||||
adListDefault=/etc/pihole/adlists.default
|
adListDefault=/etc/pihole/adlists.default
|
||||||
|
whitelistScript=/usr/local/bin/whitelist.sh
|
||||||
|
blacklistScript=/usr/local/bin/blacklist.sh
|
||||||
|
|
||||||
if [[ -f $piholeIPfile ]];then
|
if [[ -f $piholeIPfile ]];then
|
||||||
# If the file exists, it means it was exported from the installation script and we should use that value instead of detecting it in this script
|
# If the file exists, it means it was exported from the installation script and we should use that value instead of detecting it in this script
|
||||||
|
@ -220,7 +222,7 @@ function gravity_Schwarzchild() {
|
||||||
function gravity_Blacklist(){
|
function gravity_Blacklist(){
|
||||||
# Append blacklist entries if they exist
|
# Append blacklist entries if they exist
|
||||||
echo -n "::: Running blacklist script to update HOSTS file...."
|
echo -n "::: Running blacklist script to update HOSTS file...."
|
||||||
blacklist.sh -f -nr -q > /dev/null & spinner $!
|
$blacklistScript -f -nr -q > /dev/null & spinner $!
|
||||||
|
|
||||||
numBlacklisted=$(wc -l < "/etc/pihole/blacklist.txt")
|
numBlacklisted=$(wc -l < "/etc/pihole/blacklist.txt")
|
||||||
plural=; [[ "$numBlacklisted" != "1" ]] && plural=s
|
plural=; [[ "$numBlacklisted" != "1" ]] && plural=s
|
||||||
|
@ -245,7 +247,7 @@ function gravity_Whitelist() {
|
||||||
echo " done!"
|
echo " done!"
|
||||||
|
|
||||||
echo -n "::: Running whitelist script to update HOSTS file...."
|
echo -n "::: Running whitelist script to update HOSTS file...."
|
||||||
whitelist.sh -f -nr -q ${urls[@]} > /dev/null & spinner $!
|
$whitelistScript -f -nr -q ${urls[@]} > /dev/null & spinner $!
|
||||||
|
|
||||||
numWhitelisted=$(wc -l < "/etc/pihole/whitelist.txt")
|
numWhitelisted=$(wc -l < "/etc/pihole/whitelist.txt")
|
||||||
plural=; [[ "$numWhitelisted" != "1" ]] && plural=s
|
plural=; [[ "$numWhitelisted" != "1" ]] && plural=s
|
||||||
|
|
Loading…
Reference in a new issue