Geo* - Update Script

Write script:

cd /etc/senginx
mkdir geoip
cd geoip
vim geoip_update.sh
#!/bin/sh
curl -o GeoIP.dat.gz http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
curl -o GeoLiteCity.dat.gz http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip -f *.gz

Make executable, run it to get files and create cronjob to run at 5am and 5:30am on the 8th and 9th of the month, following their monthly updates on the first Tuesday of each month. Four attempts over 2 days incase their server is down:

chmod +x geoip_update.sh
bash geoip_update.sh
crontab -e
0,30 5 8,9 * * bash /etc/senginx/geoip/geoip_update.sh >/dev/null 2>&1