1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 14:58:08 +00:00

Ensure LC_NUMERIC=C is set when evaluating floating point number (non-English systems might expect "," as decimal separator

This commit is contained in:
DL6ER 2017-01-13 12:59:49 +01:00
parent b4c32e47c6
commit 845d8c0e63
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

View File

@ -57,7 +57,7 @@ normalChrono() {
domains=$(printf "%'.f" $(GetJSONValue ${json} "domains_being_blocked")) #add commas in
queries=$(printf "%'.f" $(GetJSONValue ${json} "dns_queries_today"))
blocked=$(printf "%'.f" $(GetJSONValue ${json} "ads_blocked_today"))
percentage=$(printf "%0.2f\n" $(GetJSONValue ${json} "ads_percentage_today")) #2 decimal places
LC_NUMERIC=C percentage=$(printf "%0.2f\n" $(GetJSONValue ${json} "ads_percentage_today")) #2 decimal places
echo "Blocking: ${domains}"
echo "Queries: ${queries}"