Created
December 2, 2012 03:22
-
-
Save ur5us/4186810 to your computer and use it in GitHub Desktop.
Update GeoIP db
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
#!/bin/bash | |
# crontab -e and add: | |
# 0 3 * * 3 eval [ `date +\%e` -ge 8 -a `date +\%e` -lt 15 ] && /usr/sbin/update_geoip_db | |
# update GeoIP every second Wednesday of the month | |
wget -q http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz -O - | gunzip > /usr/share/GeoIP/GeoIP.dat.new && mv /usr/share/GeoIP/GeoIP.dat.new /usr/share/GeoIP/GeoIP.dat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment