diff --git a/files/etc/cron.daily/geoip2-update b/files/etc/cron.daily/geoip2-update index 16b890c..2b3fc54 100755 --- a/files/etc/cron.daily/geoip2-update +++ b/files/etc/cron.daily/geoip2-update @@ -1,6 +1,4 @@ #!/bin/bash # download geolite2 file -mkdir -p /usr/share/GeoIP/ -./root/bin/my-download.sh /usr/share/GeoIP/GeoLite2-ASN.mmdb https://git.io/GeoLite2-ASN.mmdb -./root/bin/my-download.sh /usr/share/GeoIP/GeoLite2-City.mmdb https://git.io/GeoLite2-City.mmdb -./root/bin/my-download.sh /usr/share/GeoIP/GeoLite2-Country.mmdb https://git.io/GeoLite2-Country.mmdb +cd /etc/nginx +./geoip2-download.sh diff --git a/files/etc/nginx/GeoLite2-ASN.mmdb b/files/etc/nginx/GeoLite2-ASN.mmdb new file mode 100644 index 0000000..7b1f24d Binary files /dev/null and b/files/etc/nginx/GeoLite2-ASN.mmdb differ diff --git a/files/etc/nginx/GeoLite2-City.mmdb b/files/etc/nginx/GeoLite2-City.mmdb new file mode 100644 index 0000000..0482b28 Binary files /dev/null and b/files/etc/nginx/GeoLite2-City.mmdb differ diff --git a/files/etc/nginx/GeoLite2-Country.mmdb b/files/etc/nginx/GeoLite2-Country.mmdb new file mode 100644 index 0000000..ef8c639 Binary files /dev/null and b/files/etc/nginx/GeoLite2-Country.mmdb differ diff --git a/files/etc/nginx/cdn/cdn-arvancloud.py b/files/etc/nginx/cdn/cdn-arvancloud.py index 6700fd1..26803d7 100755 --- a/files/etc/nginx/cdn/cdn-arvancloud.py +++ b/files/etc/nginx/cdn/cdn-arvancloud.py @@ -2,8 +2,6 @@ """ Util to grab ArvanCloud Inbound addresses """ -#!/usr/local/bin/python3 -# coding: utf-8 import requests diff --git a/files/etc/nginx/cdn/cdn-bunny.py b/files/etc/nginx/cdn/cdn-bunny.py index 07d58ec..aca02c5 100755 --- a/files/etc/nginx/cdn/cdn-bunny.py +++ b/files/etc/nginx/cdn/cdn-bunny.py @@ -1,9 +1,7 @@ #!/usr/local/bin/python3 """ -Util to grab ArvanCloud Inbound addresses +Util to grab BunnyCDN Inbound addresses """ -#!/usr/local/bin/python3 -# coding: utf-8 import requests diff --git a/files/etc/nginx/cdn/cdn-cloudflare.py b/files/etc/nginx/cdn/cdn-cloudflare.py index 3727513..1c48d14 100755 --- a/files/etc/nginx/cdn/cdn-cloudflare.py +++ b/files/etc/nginx/cdn/cdn-cloudflare.py @@ -1,5 +1,7 @@ #!/usr/local/bin/python3 -# coding: utf-8 +""" +Util to grab Cloudflare Inbound addresses +""" import requests diff --git a/files/etc/nginx/cdn/cdn-fastly.py b/files/etc/nginx/cdn/cdn-fastly.py index bfc0270..c318c02 100755 --- a/files/etc/nginx/cdn/cdn-fastly.py +++ b/files/etc/nginx/cdn/cdn-fastly.py @@ -2,6 +2,7 @@ """ Util to grab Fastly Inbound addresses """ + import requests url = 'https://api.fastly.com/public-ip-list' diff --git a/files/etc/nginx/cdn/cdn-stackpath.py b/files/etc/nginx/cdn/cdn-stackpath.py index e518879..910a99c 100755 --- a/files/etc/nginx/cdn/cdn-stackpath.py +++ b/files/etc/nginx/cdn/cdn-stackpath.py @@ -2,8 +2,6 @@ """ Util to grab StackPath Inbound addresses """ -#!/usr/local/bin/python3 -# coding: utf-8 import requests diff --git a/files/etc/nginx/geoip2-download.sh b/files/etc/nginx/geoip2-download.sh new file mode 100755 index 0000000..1d52c9f --- /dev/null +++ b/files/etc/nginx/geoip2-download.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +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