The script attempts to download the newest files, unzip them, and change the name of one of the files. MaxMind does not promise a specific time the updates will be ready, so I gave it enough padding so they should have the update released by the time my script runs. This will run the job on the first Wednesday of the month at 8:05am. Create a cron job with the following settings:ĥ 8 * * 3 root & /opt/updateGeoLiteCity.Wget || Įcho "y"|mv GeoLiteCity.dat GeoIPCity.dat If you use a different location, you will need to update the cron job in step 2. Make sure that your root user has execute permissions to the script. My script file is /opt/updateGeoLiteCity. But the new format also requires a different method of setup. This new format is supposed to be better/faster, etc. Since then, Maxmind has updated their database format to GeoIP2.
I’ve been using this script to automatically update our MaxMind GeoLiteCountry and GeoLiteCity databases and thought it might be useful for others.