Skip to content

Instantly share code, notes, and snippets.

@avantassel
Created December 30, 2013 22:23
Show Gist options
  • Save avantassel/8189252 to your computer and use it in GitHub Desktop.
Save avantassel/8189252 to your computer and use it in GitHub Desktop.
Update the GeoLiteCity dat from maxmind
#!/bin/bash
dir="/var/www/geoip";
# change to dir
cd ${dir}
#download the dat file from maxmind
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
#unzip and overwrite the .dat file
gunzip -dfq GeoLiteCity.dat.gz
echo "Updated GeoLiteCity from maxmind.com"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment