You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
877 B

  1. --- a/script/autogen.d/geoip
  2. +++ b/script/autogen.d/geoip
  3. @@ -5,13 +5,13 @@ autogen_get_geoip() {
  4. echo "* Fetching geoip databases"
  5. base=https://geolite.maxmind.com/download/geoip/database
  6. if [ ! -f "country.mmdb" ]; then
  7. - curl -fsSLO $base/GeoLite2-Country.tar.gz
  8. + command -v curl && curl -fsSLO $base/GeoLite2-Country.tar.gz || wget $base/GeoLite2-Country.tar.gz
  9. tar -xf GeoLite2-Country.tar.gz
  10. mv GeoLite2-Country_20??????/GeoLite2-Country.mmdb country.mmdb
  11. rm -rf GeoLite2-Country_20??????
  12. fi
  13. if [ ! -f "asn.mmdb" ]; then
  14. - curl -fsSLO $base/GeoLite2-ASN.tar.gz
  15. + command -v curl && curl -fsSLO $base/GeoLite2-ASN.tar.gz || wget $base/GeoLite2-ASN.tar.gz
  16. tar -xf GeoLite2-ASN.tar.gz
  17. mv GeoLite2-ASN_20??????/GeoLite2-ASN.mmdb asn.mmdb
  18. rm -rf GeoLite2-ASN_20??????