Obsolete Releases > SME 8.x Contribs

In the Geoip contrib GeoIP.dat does not get copied to /usr/share/GeoIP

<< < (2/2)

Jean-Philippe Pialasse:
alternatively

wiki.contribs.org/Talk:GeoIP


be aware that some versions of geoip will expect databases at another place, here is a modified version of cron part to avoid this :

# Updating the GeoIP database monthly on the 5th at 0:00h.
 0 0 5 * * root /usr/bin/wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz -O /var/lib/GeoIP/GeoIP.dat.gz; /bin/gunzip -f /var/lib/GeoIP/GeoIP.dat.gz; cp /var/lib/GeoIP/*.dat /usr/share/GeoIP/
 0 0 5 * * root /usr/bin/wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz -O /var/lib/GeoIP/GeoIPCity.dat.gz; /bin/gunzip -f /var/lib/GeoIP/GeoIPCity.dat.gz; cp /var/lib/GeoIP/*.dat /usr/share/GeoIP/

purvis:
Because the newer GeoIp.dat files are posted some time on the first Tuesday of every month. It would make more since to have the cron do it's job on the 8th or the 9th of each month.
Personally, I think having a cron trying only once a month to update the GeoIP.dat file is too chancy.

kruhm:
Hi,

I've developed and maintain the smeserver-geoip rpm. Thanks for your interest in improving it. I can see that you've put much thought and energy into it recently.

Here are my thoughts after briefly reading through the info above:
-if something doesn't work as expected, file a bug. I happen to run into this thread but that won't always happen.


--- Quote ---The new GeoIp.dat file created by way of the crontab into the directory /var/lib/GeoIp does not update(copy) the GeoIP.dat file into /usr/share/GeoIP.
--- End quote ---
-I'm not sure why I thought it's required to be the /var/lib/GeoIP/ directory. I must have had good reason to though. Maybe this changed somewhere along the way and the wiki never got updated.


--- Quote ---The crontab shows a once a month chance to update the GeoIP.dat file.
I think that this can be improved on by having more than one chance.
--- End quote ---
What's the point? It updates once a month via cron. That's the end of it. Updating more than that will do absolutely nothing.

Thanks,

Navigation

[0] Message Index

[*] Previous page

Go to full version