mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 10:40:36 +00:00
Test Script Changes
This commit is contained in:
parent
375c9d7997
commit
e5b37f7c6f
2 changed files with 21 additions and 21 deletions
|
@ -50,20 +50,20 @@ MONTH=$(date +"%m")
|
|||
# Make Sure we are in the Build Directory
|
||||
# ***************************************
|
||||
|
||||
cd $TRAVIS_BUILD_DIR
|
||||
cd ${TRAVIS_BUILD_DIR}
|
||||
sudo git remote -v
|
||||
|
||||
# *************************
|
||||
# Create our Version Number
|
||||
# *************************
|
||||
|
||||
export GIT_TAG=V3.$YEAR.$MONTH.$TRAVIS_BUILD_NUMBER
|
||||
export GIT_TAG=V3.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER}
|
||||
|
||||
# ***************
|
||||
# Tag our release
|
||||
# ***************
|
||||
|
||||
git tag $GIT_TAG -a -m "V3.$YEAR.$MONTH.$TRAVIS_BUILD_NUMBER"
|
||||
git tag ${GIT_TAG} -a -m "V3.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER}"
|
||||
|
||||
# *****************************************
|
||||
# Push our commit and tags back to the repo
|
||||
|
|
|
@ -91,7 +91,7 @@ _inputdb11=/tmp/bad-ip-addresses.db
|
|||
# Declare temporary variables used during generation
|
||||
# **************************************************
|
||||
|
||||
_nginx=$TRAVIS_BUILD_DIR/.dev-tools/globalblacklist.template
|
||||
_nginx=${TRAVIS_BUILD_DIR}/.dev-tools/globalblacklist.template
|
||||
_tmpnginxA=_tmpnginxA
|
||||
_tmpnginx1=_tmpnginx1
|
||||
_tmpnginx2=_tmpnginx2
|
||||
|
@ -109,16 +109,16 @@ _tmpnginx11=_tmpnginx11
|
|||
# Sort all input lists alphabetically and remove any duplicates
|
||||
# *************************************************************
|
||||
|
||||
sort -u $_input1 -o $_input1
|
||||
sort -u $_input2 -o $_input2
|
||||
sort -u $_input3 -o $_input3
|
||||
sort -u $_input4 -o $_input4
|
||||
sort -u $_input5 -o $_input5
|
||||
sort -u $_input6 -o $_input6
|
||||
sort -u $_input7 -o $_input7
|
||||
sort -u $_input8 -o $_input8
|
||||
sort -u $_input9 -o $_input9
|
||||
sort -u $_input10 -o $_input10
|
||||
sort -u ${_input1} -o ${_input1}
|
||||
sort -u ${_input2} -o ${_input2}
|
||||
sort -u ${_input3} -o ${_input3}
|
||||
sort -u ${_input4} -o ${_input4}
|
||||
sort -u ${_input5} -o ${_input5}
|
||||
sort -u ${_input6} -o ${_input6}
|
||||
sort -u ${_input7} -o ${_input7}
|
||||
sort -u ${_input8} -o ${_input8}
|
||||
sort -u ${_input9} -o ${_input9}
|
||||
sort -u ${_input10} -o ${_input10}
|
||||
|
||||
# ***************************************************************
|
||||
# Start and End Strings to Search for to do inserts into template
|
||||
|
@ -163,14 +163,14 @@ _action4="3;"
|
|||
# GOOD USER AGENTS - Create and Insert
|
||||
# ************************************
|
||||
|
||||
printf '%s\n' "$_start1" >> "$_tmpnginx1"
|
||||
printf '%s\n' "${_start1}" >> ${_tmpnginx1}
|
||||
while IFS= read -r LINE
|
||||
do
|
||||
printf '\t"~*%s%s%s"\t\t%s\n' "\b" "${LINE}" "\b" "$_action1" >> "$_tmpnginx1"
|
||||
done < $_input1
|
||||
printf '%s\n' "$_end1" >> "$_tmpnginx1"
|
||||
mv $_tmpnginx1 $_inputdb1
|
||||
ed -s $_inputdb1<<\IN
|
||||
printf '\t"~*%s%s%s"\t\t%s\n' "\b" "${LINE}" "\b" "${_action1}" >> ${_tmpnginx1}
|
||||
done < ${_input1}
|
||||
printf '%s\n' "${_end1}" >> ${_tmpnginx1}
|
||||
mv ${_tmpnginx1} ${_inputdb1}
|
||||
ed -s ${_inputdb1}<<\IN
|
||||
1,/# START GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d
|
||||
/# END GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
|
||||
,d
|
||||
|
@ -183,7 +183,7 @@ ed -s $_inputdb1<<\IN
|
|||
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template
|
||||
q
|
||||
IN
|
||||
rm $_inputdb1
|
||||
rm ${_inputdb1}
|
||||
|
||||
# ********************************
|
||||
# ALLOWED BOTS - Create and Insert
|
||||
|
|
Loading…
Add table
Reference in a new issue