diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2015-07-27 07:39:39 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2015-07-27 07:42:47 +0000 |
commit | fe8c11c1954834f77fb17887c939b2866cde74a9 (patch) | |
tree | 53af73d6d6fe45a4872b9f6875ca3552cdca1aa0 /testing/ntopng/ntopng-update-geoip-db | |
parent | 5ea657e8af3ce86abe0b00c31ca667de4355493f (diff) | |
download | aports-fe8c11c1954834f77fb17887c939b2866cde74a9.tar.bz2 aports-fe8c11c1954834f77fb17887c939b2866cde74a9.tar.xz |
testing/ntopng: new aport
High-speed web-based traffic analysis and flow collection.
It's Ntop next-generation software
Diffstat (limited to 'testing/ntopng/ntopng-update-geoip-db')
-rw-r--r-- | testing/ntopng/ntopng-update-geoip-db | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/ntopng/ntopng-update-geoip-db b/testing/ntopng/ntopng-update-geoip-db new file mode 100644 index 0000000000..1ac05bc0e0 --- /dev/null +++ b/testing/ntopng/ntopng-update-geoip-db @@ -0,0 +1,25 @@ +#!/bin/sh + +BASE_URL=http://geolite.maxmind.com/download/geoip/database + +echo "Updating NTOP GeoIP databases..." + +cd /usr/share/ntopng/geoip || exit + +for u in \ + asnum/GeoIPASNum.dat.gz \ + asnum/GeoIPASNumv6.dat.gz \ + GeoLiteCity.dat.gz \ + GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz; do + FILE_GZ=${u#*/} + FILE=${FILE_GZ%.gz} + wget -O ${FILE_GZ} ${BASE_URL}/${u} && + gunzip < ${FILE_GZ} > .${FILE} && + mv -f .${FILE} ${FILE} && + rm -f ${FILE_GZ} || + exit +done + +rc-service ntopng status && rc-service ntopng restart + +echo "NTOP GeoIP databases were successfully updated" |