Add support for downloading legacy geoip databases

Pass the geoip databases to measurement-kit
This commit is contained in:
Arturo Filastò
2018-03-23 15:26:25 +01:00
parent e56ce73006
commit 749cc665af
3 changed files with 73 additions and 22 deletions
+2 -4
View File
@@ -1,8 +1,6 @@
package geoip
import (
"path/filepath"
"github.com/alecthomas/kingpin"
"github.com/apex/log"
"github.com/openobservatory/gooni/internal/cli/root"
@@ -21,10 +19,10 @@ func init() {
return err
}
geoipPath := filepath.Join(ctx.Home, "geoip")
geoipPath := utils.GeoIPDir(ctx.Home)
if *shouldUpdate {
utils.DownloadGeoIPDatabaseFiles(geoipPath)
utils.DownloadLegacyGeoIPDatabaseFiles(geoipPath)
}
loc, err := utils.GeoIPLookup(geoipPath)