Support

Admin Tools

#12701 cron job to update geo-ip db

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Tuesday, 19 June 2012 02:20 CDT

user52972
Per this thread: https://www.akeebabackup.com/my-tickets/ticket/admin-tools/11004-i-would-like-to-use-cron-to-update-the-geoip-db.html

Would you mind creating a script that will run as a cron job to automatically download and install the geo-ip Db?

All of my sites are on linux servers.

Many many thanks if you can help.

-jay

nicholas
Akeeba Staff
Manager
You can do something like the following. Inside your site's cli directory create the file fetch_geoip.sh with the following contents:
#!/bin/sh
cd `pwd`/../administrator/components/com_admintools/assets/geoip
rm GeoIP.dat 2> /dev/null
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat
.gz 1> /dev/null 2> /dev/null
gunzip GeoIP.dat.gz

Give that file 0755 permissions. Now create a CRON job which runs this script every month and you're set. Basic Linux command line kung-fu :)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!