geoip: pipe wget right into gzip

Skip over creating temporary files.
This commit is contained in:
Jan Engelhardt
2020-04-21 12:01:52 +02:00
parent 74fcd4a2ae
commit 9193adc835

View File

@@ -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