initial commit of file from CVS for smeserver-xt_geoip on Sat Sep 7 16:46:09 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 16:46:09 +10:00
parent 6a9aa6baf5
commit 23a0172ede
71 changed files with 10915 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
#! /bin/bash
for par in "$@"
do
CN=$(/usr/bin/mmdblookup --file /usr/share/GeoIP/GeoLite2-Country.mmdb --ip $par country iso_code 2>/dev/null | cut -d\" -f2| tr -d '\n')
if [ -z $CN ]; then echo 'XX'; else echo $CN; fi
done