Skip to content

Instantly share code, notes, and snippets.

View ur5us's full-sized avatar

Juri Hahn ur5us

  • Unfolding Web
  • Auckland, NZ
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ur5us on github.
  • I am ur5us (https://keybase.io/ur5us) on keybase.
  • I have a public key ASDix5xrFDs56d3Fy6tJNkUm8IHzWObzqZ8imGh_3srabwo

To claim this, I am signing this object:

@ur5us
ur5us / update_geoip_db
Created December 2, 2012 03:22
Update GeoIP db
#!/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