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

Contents 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


Revision 1.2 - (show annotations) (download)
Tue Jan 14 14:47:14 2020 UTC (4 years, 3 months ago) by michel
Branch: MAIN
CVS Tags: xtables-addons-1_47_1-15_el6_sme, HEAD
Changes since 1.1: +20 -7 lines
* Sat Jan 11 2020 Michel Begue <mab974@gmail.com> 1.47.1-15.sme
- add license_key in download script of bases

1 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
3 +++ xtables-addons-1.47.1/geoip/xt_geoip_dl 2020-01-12 22:26:49.885000000 +0400
4 @@ -1,7 +1,26 @@
5 #!/bin/sh
6
7 +status=$(/sbin/e-smith/config getprop geoip status)
8 +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_*
22
23 -wget -q http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip
24 +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 + echo "Error while downloading"
27 + exit 2
28 +fi
29 +
30 unzip -q GeoLite2-Country-CSV.zip
31 rm -f GeoLite2-Country-CSV.zip

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