Get totals of bad referrers and bad bots being protected against.

This commit is contained in:
Mitchell Krog 2017-06-21 15:23:22 +02:00
parent 8dd8e89d9b
commit 290120bec4
2 changed files with 4 additions and 2 deletions

View file

@ -14,7 +14,7 @@
********************************************
##### Version Information ##
If this helps you [why not buy me a beer](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BKF9XT6WHATLG):beer:
## If this helps you [why not buy me a beer](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BKF9XT6WHATLG):beer:
##### Created by: https://github.com/mitchellkrogza for use on Nginx Web Server https://www.nginx.com/
##### Copyright Mitchell Krog <mitchellkrog@gmail.com>

View file

@ -8,6 +8,8 @@ start=$(date +%s.%N)
versionyear=$(date +%Y)
versionmonth=$(date +%m)
MY_GIT_TAG=V3.$versionyear.$versionmonth.$TRAVIS_BUILD_NUMBER
BAD_REFERRERS=$(wc -l < /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/_generator_lists/bad-referrers.list)
BAD_BOTS=$(wc -l < /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/_generator_lists/bad-user-agents.list)
# Temporary database files we create
_inputdbA=/tmp/lastupdated.db
@ -25,7 +27,7 @@ now="$(date)"
end=$(date +%s.%N)
echo $_startmarker >> $_tmpnginxA
runtime=$(python -c "print(${end} - ${start})")
printf "********************************************\n# Version: "$MY_GIT_TAG"\n********************************************\n" >> $_tmpnginxA
printf "********************************************\n## Version: "$MY_GIT_TAG"\n## Bad Referrer Count: "$BAD_REFERRERS"\n## Bad Bot Count: "$BAD_BOTS"\n********************************************\n" >> $_tmpnginxA
echo $_endmarker >> $_tmpnginxA
IFS=$LASTUPDATEIFS
mv $_tmpnginxA $_inputdbA