Skip to content

Commit 3971651

Browse files
change version information block of globalblacklist.conf
1 parent a404c02 commit 3971651

File tree

2 files changed

+41
-44
lines changed

2 files changed

+41
-44
lines changed

globalblacklist.conf

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
### THE ULTIMATE NGINX BAD BOT BLOCKER
33
### **********************************
44

5-
### Version 2.2017.07
5+
### Version Information
6+
### Version: 2.2017.07.349
7+
### Updated: xxxx
8+
### Generated In: xxx
9+
### Version Information END
610

711
### This file implements a checklist / blacklist for good user agents, bad user agents and
812
### bad referrers. It also has whitelisting for your own IP's and known good IP Ranges
@@ -16,15 +20,6 @@
1620
### - https://github.com/mariusv/nginx-badbot-blocker
1721
### - https://github.com/oohnoitz/nginx-blacklist
1822

19-
### Last Updated
20-
### Updated: Wed May 3 16:13:02 UTC 2017
21-
### Build: v1.0.374
22-
### End Last Updated
23-
24-
### Generated in
25-
### 0.0106055736542 seconds
26-
### End Generated in
27-
2823
### Tested on: nginx/1.10.0 (Ubuntu 16.04)
2924

3025
### This list was developed and is in use on a live Nginx server running some very busy web sites.

travis-ci/modify-globalblacklist.sh

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# Start time of script generation
77
start=$(date +%s.%N)
8-
MY_GIT_TAG=v1.0.$TRAVIS_BUILD_NUMBER
8+
MY_GIT_TAG=v2.2017.07.$TRAVIS_BUILD_NUMBER
99

1010
# Temporary database files we create
1111
_inputdbA=/tmp/lastupdated.db
@@ -17,29 +17,31 @@ _tmpnginxA=tmpnginxA
1717
_tmpnginxB=tmpnginxB
1818

1919
# Start and End Strings to Search for to do inserts into template
20-
_startdate="### Last Updated"
21-
_enddate="### End Last Updated"
22-
_startgen="### Generated in"
23-
_endgen="### End Generated in"
20+
_startmarker="### Version Information"
21+
_endmarker="### Version Information END"
22+
#_startgen="### Generated in"
23+
#_endgen="### End Generated in"
2424

25-
# PRINT DATE AND TIME OF LAST UPDATE
25+
# PRINT VERSION INFORMATION
2626
# **********************************
2727
LASTUPDATEIFS=$IFS
2828
IFS=$'\n'
2929
now="$(date)"
30-
echo $_startdate >> $_tmpnginxA
31-
printf "### Updated: "$now"\n### Build: "$MY_GIT_TAG"\n" >> $_tmpnginxA
32-
echo $_enddate >> $_tmpnginxA
30+
end=$(date +%s.%N)
31+
echo $_startmarker >> $_tmpnginxA
32+
runtime=$(python -c "print(${end} - ${start})")
33+
printf "### Version: "$MY_GIT_TAG"\n### Updated: "$now"\n### Generated In: "$runtime" seconds\n" >> $_tmpnginxA
34+
echo $_endmarker >> $_tmpnginxA
3335
IFS=$LASTUPDATEIFS
3436
mv $_tmpnginxA $_inputdbA
3537
ed -s $_inputdbA<<\IN
36-
1,/### Last Updated/d
37-
/### End Last Updated/,$d
38+
1,/### Version Information/d
39+
/### Version Information END/,$d
3840
,d
3941
.r /home/travis/build/mitchellkrogza/Travis-CI-Nginx-for-Testing-Nginx-Configuration/globalblacklist.conf
40-
/### Last Updated/x
42+
/### Version Information/x
4143
.t.
42-
.,/### End Last Updated/-d
44+
.,/### Version Information END/-d
4345
#,p
4446
#,p used to print output replaced with w below to write
4547
w /home/travis/build/mitchellkrogza/Travis-CI-Nginx-for-Testing-Nginx-Configuration/globalblacklist.conf
@@ -49,26 +51,26 @@ rm $_inputdbA
4951

5052
# End time of script generation
5153
# *****************************
52-
GENTIME=$IFS
53-
IFS=$'\n'
54-
end=$(date +%s.%N)
55-
runtime=$(python -c "print(${end} - ${start})")
56-
echo $_startgen >> $_tmpnginxB
57-
printf "### "$runtime" seconds\n" >> $_tmpnginxB
58-
echo $_endgen >> $_tmpnginxB
59-
IFS=$GENTIME
60-
mv $_tmpnginxB $_inputdbB
61-
ed -s $_inputdbB<<\IN
62-
1,/### Generated in/d
63-
/### End Generated in/,$d
64-
,d
65-
.r /home/travis/build/mitchellkrogza/Travis-CI-Nginx-for-Testing-Nginx-Configuration/globalblacklist.conf
66-
/### Generated in/x
67-
.t.
68-
.,/### End Generated in/-d
69-
w /home/travis/build/mitchellkrogza/Travis-CI-Nginx-for-Testing-Nginx-Configuration/globalblacklist.conf
70-
q
71-
IN
72-
rm $_inputdbB
54+
#GENTIME=$IFS
55+
#IFS=$'\n'
56+
#end=$(date +%s.%N)
57+
#runtime=$(python -c "print(${end} - ${start})")
58+
#echo $_startgen >> $_tmpnginxB
59+
#printf "### "$runtime" seconds\n" >> $_tmpnginxB
60+
#echo $_endgen >> $_tmpnginxB
61+
#IFS=$GENTIME
62+
#mv $_tmpnginxB $_inputdbB
63+
#ed -s $_inputdbB<<\IN
64+
#1,/### Generated in/d
65+
#/### End Generated in/,$d
66+
#,d
67+
#.r /home/travis/build/mitchellkrogza/Travis-CI-Nginx-for-Testing-Nginx-Configuration/globalblacklist.conf
68+
#/### Generated in/x
69+
#.t.
70+
#.,/### End Generated in/-d
71+
#w /home/travis/build/mitchellkrogza/Travis-CI-Nginx-for-Testing-Nginx-Configuration/globalblacklist.conf
72+
#q
73+
#IN
74+
#rm $_inputdbB
7375

7476
exit 0

0 commit comments

Comments
 (0)