ntop / docker-ntop

A collection of Dockerfile for running ntop applications on Docker
299 stars 31 forks source link

MaxMind geoipupdate install and config script #6

Closed phantomski77 closed 2 years ago

phantomski77 commented 2 years ago

An attempt to simplify and automate MaxMind GeoLite2 geoipupdate tool installation and configuration.

It's meant to be edited first (at least GeoIP account credentials at the top of the file need to be set) and then run as an script either at the end of Docker image build, or downloading it inside the container and running it there.

sudo ./install_geoipupdate.sh

It achieves that by these steps:

It does some basic validation and error checking and provides verbose output for detecting issues. It only updates files that need to be updated, so can be subsequently run if geoipupdate tool version changes or to manually update database or recreate cron job.

Everything should be apparent from comments in the code.

Please let me know if this is useful, or you want me to implement any changes. I'll try to keep it up to date if anything changes on MaxMind's or ntop's side.

Please bear with the imperfect code. One of my first attempts ;)

lucaderi commented 2 years ago

Thank you for your contribution