mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-03 19:20:16 +00:00
Add count totals for bad referrers and bots into globalblacklist.conf file Version Information Block.
This commit is contained in:
parent
de4f32f31e
commit
93fefc2cae
1 changed files with 4 additions and 2 deletions
|
@ -8,6 +8,8 @@ start=$(date +%s.%N)
|
||||||
versionyear=$(date +%Y)
|
versionyear=$(date +%Y)
|
||||||
versionmonth=$(date +%m)
|
versionmonth=$(date +%m)
|
||||||
MY_GIT_TAG=V3.$versionyear.$versionmonth.$TRAVIS_BUILD_NUMBER
|
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
|
# Temporary database files we create
|
||||||
_inputdbA=/tmp/lastupdated.db
|
_inputdbA=/tmp/lastupdated.db
|
||||||
|
@ -28,7 +30,7 @@ now="$(date)"
|
||||||
end=$(date +%s.%N)
|
end=$(date +%s.%N)
|
||||||
echo $_startmarker >> $_tmpnginxA
|
echo $_startmarker >> $_tmpnginxA
|
||||||
runtime=$(python -c "print(${end} - ${start})")
|
runtime=$(python -c "print(${end} - ${start})")
|
||||||
printf "############################################\n### Version: "$MY_GIT_TAG"\n### Updated: "$now"\n### Generated In: "$runtime" seconds\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
|
echo $_endmarker >> $_tmpnginxA
|
||||||
IFS=$LASTUPDATEIFS
|
IFS=$LASTUPDATEIFS
|
||||||
mv $_tmpnginxA $_inputdbA
|
mv $_tmpnginxA $_inputdbA
|
||||||
|
@ -55,7 +57,7 @@ now="$(date)"
|
||||||
end=$(date +%s.%N)
|
end=$(date +%s.%N)
|
||||||
echo $_startmarker >> $_tmpnginxB
|
echo $_startmarker >> $_tmpnginxB
|
||||||
runtime=$(python -c "print(${end} - ${start})")
|
runtime=$(python -c "print(${end} - ${start})")
|
||||||
printf "############################################\n### Version: "$MY_GIT_TAG"\n### Updated: "$now"\n### Generated In: "$runtime" seconds\n############################################\n" >> $_tmpnginxB
|
printf "********************************************\n#### Version: "$MY_GIT_TAG"\n#### Bad Referrer Count: "$BAD_REFERRERS"\n#### Bad Bot Count: "$BAD_BOTS"\n********************************************\n" >> $_tmpnginxB
|
||||||
echo $_endmarker >> $_tmpnginxB
|
echo $_endmarker >> $_tmpnginxB
|
||||||
IFS=$LASTUPDATE2IFS
|
IFS=$LASTUPDATE2IFS
|
||||||
mv $_tmpnginxB $_inputdbA
|
mv $_tmpnginxB $_inputdbA
|
||||||
|
|
Loading…
Add table
Reference in a new issue