File: xt_geoip_dl_maxmind

package info (click to toggle)
xtables-addons 3.13-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,492 kB
  • sloc: ansic: 10,713; sh: 4,481; perl: 356; makefile: 143; python: 15
file content (16 lines) | stat: -rwxr-xr-x 404 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

if [ $# -eq 1 ]; then
    exec <$1
elif [ $# -ne 0 ]; then
    echo $(basename $0) [ licence_key_file ] 1>&2
    exit 1
fi

read licence_key

rm -rf GeoLite2-Country-CSV_*

wget -q -OGeoLite2-Country-CSV.zip "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&license_key=${licence_key}&suffix=zip"
unzip -q GeoLite2-Country-CSV.zip
rm -f GeoLite2-Country-CSV.zip