/[smecontribs]/rpms/xtables-addons/contribs9/xtables-addons-1.47.1-bz10860-license_key.patch
ViewVC logotype

Diff of /rpms/xtables-addons/contribs9/xtables-addons-1.47.1-bz10860-license_key.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by michel, Sat Jan 11 07:27:32 2020 UTC Revision 1.2 by michel, Tue Jan 14 14:47:14 2020 UTC
# Line 1  Line 1 
1  diff -urN xtables-addons-1.47.1.old/geoip/xt_geoip_dl xtables-addons-1.47.1/geoip/xt_geoip_dl  diff -urN xtables-addons-1.47.1.old/geoip/xt_geoip_dl xtables-addons-1.47.1/geoip/xt_geoip_dl
2  --- xtables-addons-1.47.1.old/geoip/xt_geoip_dl 2020-01-11 11:03:01.000000000 +0400  --- xtables-addons-1.47.1.old/geoip/xt_geoip_dl 2020-01-11 11:03:01.000000000 +0400
3  +++ xtables-addons-1.47.1/geoip/xt_geoip_dl     2020-01-11 11:07:26.045000000 +0400  +++ xtables-addons-1.47.1/geoip/xt_geoip_dl     2020-01-12 22:26:49.885000000 +0400
4  @@ -1,7 +1,13 @@  @@ -1,7 +1,26 @@
5   #!/bin/sh   #!/bin/sh
6    
7  +LicenseKey=$(/sbin/e-smith/config get xt_geoip_LicenseKey)  +status=$(/sbin/e-smith/config getprop geoip status)
8  +#echo $LicenseKey  +if [[ "$status" != "enabled" ]]
9    +then
10    +    echo "Geoip is not enabled. No download."
11    +    exit 1
12    +fi
13    +
14    +LicenseKey=$(/sbin/e-smith/config getprop geoip LicenseKey)
15    +if [ -z $LicenseKey ]
16    +then
17    +    echo "No License Key available. Downloading cannot be performed"
18    +    exit 1
19    +fi
20  +  +
21   rm -rf GeoLite2-Country-CSV_*   rm -rf GeoLite2-Country-CSV_*
22    
23  -wget -q http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip  -wget -q http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip
24  +wget -O GeoLite2-Country-CSV.zip -q "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&license_key=${LicenseKey}&suffix=zip"  +if ( ! wget -O GeoLite2-Country-CSV.zip -q "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&license_key=${LicenseKey}&suffix=zip" )
25  +  +then
26  +#wget -q http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip  +    echo "Error while downloading"
27    +    exit 2
28    +fi
29  +  +
30   unzip -q GeoLite2-Country-CSV.zip   unzip -q GeoLite2-Country-CSV.zip
31   rm -f GeoLite2-Country-CSV.zip   rm -f GeoLite2-Country-CSV.zip


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed