Table of Contents

Update GeoIp database

In the scripts folder is a scrpt to update the Geoip database files.

> scripts/geodb_update.sh -h

   _____ _____ ____  _____    ____                _           _         
  |     |     |    \| __  |  |    \ ___ _ _ _ ___| |___ ___ _| |___ ___ 
  | | | | | | |  |  | __ -|  |  |  | . | | | |   | | . | .'| . | -_|  _|
  |_|_|_|_|_|_|____/|_____|  |____/|___|_____|_|_|_|___|__,|___|___|_|  
                                                                    

This script fetches GeoIP2 database files.
They will be written to 'public_html/vendor/geolocation-data/db'.

USAGE: scripts/geodb_update.sh [download|update]

Create a cronjob that updates once per week (or once per month) the database files. Start the script with parameter “update”.

45 3 * * 1 www-data php /var/www/mfa/scripts/geodb_update.sh update >[your-logfile] 2>&1

For better monitoring we use Axels Cronwrapper - see 🌐 https://www.axel-hahn.de/docs/cronwrapper/

45 3 * * 1 root /opt/cronwrapper/cronwrapper.sh 10800 'su - www-data -s /bin/sh -c "/var/www/mfa/scripts/geodb_update.sh update"' 'mfa-geodb-update'