Switch GeoIP database from MaxMind to IP2Location.

The IP2Location data is licensed under CC BY-SA, which
allows us to distribute the database with releases.
This commit is contained in:
Paul Chote
2020-04-12 14:36:35 +01:00
committed by abcdefg30
parent 6828c4c1e9
commit 9c4faddc0f
15 changed files with 137 additions and 74 deletions

View File

@@ -21,6 +21,13 @@ function All-Command
{
Write-Host "Build succeeded." -ForegroundColor Green
}
if (!(Test-Path "IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP") -Or (((get-date) - (get-item "IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP").LastWriteTime) -gt (new-timespan -days 30)))
{
echo "Downloading IP2Location GeoIP database."
$target = Join-Path $pwd.ToString() "IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP"
(New-Object System.Net.WebClient).DownloadFile("https://download.ip2location.com/lite/IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP", $target)
}
}
function Clean-Command