smeserver-geoip/root/usr/bin/geoiplook

7 lines
162 B
Plaintext
Raw Normal View History

#!/bin/bash
for var in "$@"
do
/usr/bin/mmdblookup --file /usr/share/GeoIP/GeoLite2-Country.mmdb --ip $1 country iso_code |cut -d\" -f2| tr -d '\n'
echo ""
done