mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 13:50:17 +00:00
Fix incorrect echo
This commit is contained in:
parent
f6edd435af
commit
47cc757ed0
1 changed files with 3 additions and 3 deletions
|
@ -90,7 +90,7 @@ function AddDomain(){
|
||||||
if $bool; then
|
if $bool; then
|
||||||
#domain not found in the whitelist file, add it!
|
#domain not found in the whitelist file, add it!
|
||||||
if $versbose; then
|
if $versbose; then
|
||||||
echo -n "::: Adding $1 to whitelist.txt..."
|
echo -n "::: Adding $1 to $whitelist..."
|
||||||
fi
|
fi
|
||||||
echo "$1" >> $whitelist
|
echo "$1" >> $whitelist
|
||||||
modifyHost=true
|
modifyHost=true
|
||||||
|
@ -99,7 +99,7 @@ function AddDomain(){
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if $versbose; then
|
if $versbose; then
|
||||||
echo "::: $1 already exists in whitelist.txt, no need to add!"
|
echo "::: $1 already exists in $whitelist, no need to add!"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ function ModifyHostFile(){
|
||||||
echo "$rdom" | awk -v ipv4addr="$piholeIP" '{sub(/\r$/,""); print ipv4addr" "$0}' >>$adList
|
echo "$rdom" | awk -v ipv4addr="$piholeIP" '{sub(/\r$/,""); print ipv4addr" "$0}' >>$adList
|
||||||
echo " done!"
|
echo " done!"
|
||||||
fi
|
fi
|
||||||
echo -n "::: Removing $rdom from whitelist.txt..."
|
echo -n "::: Removing $rdom from $whitelist..."
|
||||||
echo "$rdom" | sed 's/\./\\./g' | xargs -I {} perl -i -ne'print unless /'{}'(?!.)/;' $whitelist
|
echo "$rdom" | sed 's/\./\\./g' | xargs -I {} perl -i -ne'print unless /'{}'(?!.)/;' $whitelist
|
||||||
echo " done!"
|
echo " done!"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue