cached blacklists data

This commit is contained in:
bunkerity
2020-11-15 15:43:41 +01:00
parent ed451877ae
commit fbf81c94be
12 changed files with 46 additions and 16 deletions

View File

@@ -8,6 +8,7 @@ while read entry ; do
echo "deny ${entry};" >> /etc/nginx/block-abusers.conf
fi
done
cp /etc/nginx/block-abusers.conf /cache
if [ -f /tmp/nginx.pid ] ; then
/usr/sbin/nginx -s reload
fi

View File

@@ -8,6 +8,7 @@ while read entry ; do
echo "deny ${entry};" >> /etc/nginx/block-tor-exit-node.conf
fi
done
cp /etc/nginx/block-tor-exit-node.conf /cache
if [ -f /tmp/nginx.pid ] ; then
/usr/sbin/nginx -s reload
fi

View File

@@ -5,6 +5,7 @@ URL="https://download.db-ip.com/free/dbip-country-lite-$(date +%Y-%m).mmdb.gz"
wget -O /etc/nginx/geoip.mmdb.gz "$URL" > /dev/null 2>&1
if [ -f /etc/nginx/geoip.mmdb.gz ] ; then
gunzip -f /etc/nginx/geoip.mmdb.gz
cp /etc/nginx/geoip.mmdb /cache
if [ -f /tmp/nginx.pid ] ; then
/usr/sbin/nginx -s reload
fi

View File

@@ -8,6 +8,7 @@ while read entry ; do
echo "deny ${entry};" >> /etc/nginx/block-proxies.conf
fi
done
cp /etc/nginx/block-proxies.conf /cache
if [ -f /tmp/nginx.pid ] ; then
/usr/sbin/nginx -s reload
fi

View File

@@ -19,6 +19,7 @@ DATA_ESCAPED=$(echo "$DATA" | sed 's: :\\\\ :g' | sed 's:\\\\ yes;: yes;:g' | se
cp /opt/confs/global/map-user-agent.conf /etc/nginx/map-user-agent.conf
replace_in_file "/etc/nginx/map-user-agent.conf" "%BLOCK_USER_AGENT%" "$DATA_ESCAPED"
cp /etc/nginx/map-user-agent.conf /cache
if [ -f /tmp/nginx.pid ] ; then
/usr/sbin/nginx -s reload