diff --git a/files/etc/cron.daily/geoip2-update b/files/etc/cron.daily/geoip2-update index 2b3fc54..98f8621 100755 --- a/files/etc/cron.daily/geoip2-update +++ b/files/etc/cron.daily/geoip2-update @@ -1,4 +1,6 @@ #!/bin/bash # download geolite2 file -cd /etc/nginx -./geoip2-download.sh +bash /etc/nginx/geoip2-download.sh + +# reload nginx +nginx -s reload \ No newline at end of file diff --git a/files/etc/nginx/geoip2-download.sh b/files/etc/nginx/geoip2-download.sh index 1d52c9f..9aed8d3 100755 --- a/files/etc/nginx/geoip2-download.sh +++ b/files/etc/nginx/geoip2-download.sh @@ -1,5 +1,6 @@ #!/bin/bash # +cd /etc/nginx curl -sLo GeoLite2-ASN.mmdb https://git.io/GeoLite2-ASN.mmdb curl -sLo GeoLite2-City.mmdb https://git.io/GeoLite2-City.mmdb curl -sLo GeoLite2-Country.mmdb https://git.io/GeoLite2-Country.mmdb