Created
July 28, 2024 13:32
-
-
Save holly/6b0aebb633eb81b0f837e575b7e6fd2c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/usr/bin/env bash | |
GEOIP_LICENSE_KEY=your_maxmind_geoip_license_key | |
for GEOIP_EDITION in GeoLite2-Country GeoLite2-ASN GeoLite2-City; do | |
tarball="${GEOIP_EDITION}.tar.gz" | |
curl -sSL "https://download.maxmind.com/app/geoip_download?edition_id=${GEOIP_EDITION}&license_key=${GEOIP_LICENSE_KEY}&suffix=tar.gz" -o $tarball | |
tar -xzf $tarball --wildcards "*/${GEOIP_EDITION}.mmdb" --strip=1 | |
rm $tarball | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment