From d586ba312611daa440d1f663d123e708716682a9 Mon Sep 17 00:00:00 2001 From: mospaeda Date: Sat, 21 Mar 2015 00:00:09 +0100 Subject: [PATCH] Automatic IP detection with all locale --- gravity-adv.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gravity-adv.sh b/gravity-adv.sh index 2b9431bf..e89e1e4f 100755 --- a/gravity-adv.sh +++ b/gravity-adv.sh @@ -4,6 +4,11 @@ piholeIP="127.0.0.1" # Optionally, uncomment to automatically detect the address. Thanks Gregg #piholeIP=$(ifconfig eth0 | awk '/inet addr/{print substr($2,6)}') +# Below code allows to automatically detect the address with all locale +langsys=$LANG +LANG=en_US.utf8 +piholeIP=$(ifconfig eth0 | awk '/inet addr/{print substr($2,6)}') +LANG=$langsys # Config file to hold URL rules eventHorizion="/etc/dnsmasq.d/adList.conf"