From: Jan Engelhardt Date: Tue, 21 Apr 2020 10:01:52 +0000 (+0200) Subject: geoip: pipe wget right into gzip X-Git-Tag: v3.10~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9193adc835ffb048bc64092a71f3c018d2fab5ad;p=thirdparty%2Fxtables-addons.git geoip: pipe wget right into gzip Skip over creating temporary files. --- diff --git a/geoip/xt_geoip_dl b/geoip/xt_geoip_dl index 91aa95b..26a7892 100755 --- a/geoip/xt_geoip_dl +++ b/geoip/xt_geoip_dl @@ -1,11 +1,5 @@ #!/bin/sh timestamp=$(date "+%Y-%m") - -wget -q "https://download.db-ip.com/free/dbip-country-lite-${timestamp}.csv.gz" - -zcat dbip-country-lite-${timestamp}.csv.gz > dbip-country-lite.csv - -rm -f dbip-country-lite-${timestamp}.csv.gz - -exit 0 +wget -q "https://download.db-ip.com/free/dbip-country-lite-$timestamp.csv.gz" -O- | \ + gzip -cd >dbip-country-lite.csv