Make the download of geoip data files conditional

This commit is contained in:
Arturo Filastò
2018-06-22 11:17:51 +02:00
parent 1bba0c7899
commit 15c901ed68
2 changed files with 27 additions and 16 deletions
+4
View File
@@ -19,6 +19,10 @@ func init() {
return err
}
if err = ctx.MaybeDownloadDataFiles(); err != nil {
log.WithError(err).Error("failed to download data files")
}
geoipPath := utils.GeoIPDir(ctx.Home)
if *shouldUpdate {
utils.DownloadGeoIPDatabaseFiles(geoipPath)