mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Merge pull request #1207 from r0ckarong/master
Fix output for wildcards in gravity.sh
This commit is contained in:
commit
21d771e171
1 changed files with 4 additions and 4 deletions
|
@ -239,12 +239,12 @@ gravity_Blacklist() {
|
||||||
gravity_Wildcard() {
|
gravity_Wildcard() {
|
||||||
# Return number of wildcards in output - don't actually handle wildcards
|
# Return number of wildcards in output - don't actually handle wildcards
|
||||||
if [[ -f "${wildcardlist}" ]]; then
|
if [[ -f "${wildcardlist}" ]]; then
|
||||||
num=$(grep -c ^ "${wildcardlist}")
|
numWildcards=$(grep -c ^ "${wildcardlist}")
|
||||||
if [[ -n "${IPV4_ADDRESS}" && -n "${IPV6_ADDRESS}" ]];then
|
if [[ -n "${IPV4_ADDRESS}" && -n "${IPV6_ADDRESS}" ]];then
|
||||||
let num/=2
|
let numWildcards/=2
|
||||||
fi
|
fi
|
||||||
plural=; [[ "$num" != "1" ]] && plural=s
|
plural=; [[ "$numWildcards" != "1" ]] && plural=s
|
||||||
echo "::: Wildcard blocked domain${plural}: $numBlacklisted"
|
echo "::: Wildcard blocked domain${plural}: $numWildcards"
|
||||||
else
|
else
|
||||||
echo "::: No wildcards used!"
|
echo "::: No wildcards used!"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue