]> jfr.im git - irc/SurrealServices/srsv.git/commitdiff
geolite has changed a bit, so we update in kind
authortabris <redacted>
Sun, 16 Jun 2013 00:54:56 +0000 (00:54 +0000)
committertabris <redacted>
Sun, 16 Jun 2013 00:54:56 +0000 (00:54 +0000)
git-svn-id: http://svn.tabris.net/repos/srsv@3609 70d4eda1-72e9-0310-a436-91e5bd24443c

branches/0.4.3/utils/geoip.pl

index 2cc0e38bb0ced89b2653c4659458e4b8836bf01f..1df119a1b0dee9c2fc24baeaecf8c15ecfbf2fb9 100755 (executable)
@@ -79,7 +79,8 @@ BEGIN {
        import constant {
                #countrydb_url =>  'http://www.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip',
                #FIXME: This needs a date generator!
-               countrydb_url => "http://www.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity_${date}.zip",
+               #countrydb_url => "http://www.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity_latest.zip",
+               countrydb_url => "http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity-latest.zip",
                srcname => "GeoLiteCity_${date}.zip",
        };
 }
@@ -116,7 +117,7 @@ sub downloadData() {
        use File::stat;
        if($stat = stat($srcPath)) {
                print "Checking for updated country data...\n";
-               my $header = qx "wget --spider -S @{[countrydb_url]} 2>&1";
+               my $header = qx "wget --spider -S @{[countrydb_url]} -O @{[srcname]} 2>&1";
                ($date) = ($header =~ /Last-Modified: (.*)/);
                ($size) = ($header =~ /Content-Length: (.*)/);
        }