Skip to content

Instantly share code, notes, and snippets.

@askaidau
Created April 5, 2017 11:04
Show Gist options
  • Save askaidau/5bfd44950b3f602644d6c8e7a3d525c1 to your computer and use it in GitHub Desktop.
Save askaidau/5bfd44950b3f602644d6c8e7a3d525c1 to your computer and use it in GitHub Desktop.
Update GeoIP data files automatically
#!/bin/bash
cd /usr/share/GeoIP
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz || { echo 'Could not download GeoLiteCountry, exiting.' ; exit 1; }
#wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz || { echo 'Could not download GeoLiteCity, exiting.' ; exit 1; }
gunzip -f GeoIP.dat.gz
#gunzip -f GeoLiteCity.dat.gz
echo "y"
#|mv GeoLiteCity.dat GeoIPCity.dat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment