[add] if geoIP.dat exist use it
This commit is contained in:
parent
94f61fcdc6
commit
8561ebc1e6
|
@ -8,7 +8,12 @@ curDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
|
||||||
|
|
||||||
source $curDir/bancount.cfg
|
source $curDir/bancount.cfg
|
||||||
|
|
||||||
allInfoIp=`geoiplookup $ip`;
|
if [ -f GeopIP.dat]
|
||||||
|
then
|
||||||
|
allInfoIp=`geoiplookup $ip`;
|
||||||
|
else
|
||||||
|
allInfoIp=`geoiplookup -f GeopIP.dat $ip`;
|
||||||
|
fi
|
||||||
|
|
||||||
geoip () {
|
geoip () {
|
||||||
echo $allInfoIp | awk -F, '{print $2}' | sed s/\ //
|
echo $allInfoIp | awk -F, '{print $2}' | sed s/\ //
|
||||||
|
|
Loading…
Reference in New Issue