mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 18:50:13 +00:00
Remove old script files - all replaced with new generator scripts.
This commit is contained in:
parent
0c43289777
commit
654d1030f1
7 changed files with 0 additions and 317 deletions
|
@ -1,11 +0,0 @@
|
|||
server {
|
||||
listen *:9000;
|
||||
|
||||
root /var/www/html;
|
||||
server_name localhost;
|
||||
charset UTF-8;
|
||||
|
||||
location / {
|
||||
root /var/www/html/;
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/bash
|
||||
YEAR=$(date +"%Y")
|
||||
MONTH=$(date +"%m")
|
||||
|
||||
# Make Sure we are in the Build Directory
|
||||
cd $TRAVIS_BUILD_DIR
|
||||
|
||||
# Create our Version 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"
|
||||
|
||||
# Push our commit and tags back to the repo
|
||||
sudo git push origin master && git push origin master --tags
|
||||
|
||||
# Uncomment to list all git folders and modified files etc
|
||||
#ls -aR
|
||||
|
||||
# Now TravisCI moves into the deploy: section of TravisCI - see .travis.yml
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
|
||||
echo "Welcome to Nginx\n";
|
||||
echo "This is the Travis Testing Environment for the Nginx Ultimate Bad Bot Blocker\n";
|
||||
echo "Visit https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker\n";
|
|
@ -1,67 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Travis CI Testing for Nginx Ultimate Bad Bot Blocker
|
||||
# https://github.com/mitchellkrogza
|
||||
|
||||
set -x
|
||||
|
||||
# Start Getting Nginx Ready for Testing the Nginx Bad Bot Blocker
|
||||
|
||||
# Delete default site created by Nginx Installation
|
||||
|
||||
sudo rm /etc/nginx/sites-available/default
|
||||
|
||||
# Download the Nginx Bad Bot Blocker setup files from the Live Repository
|
||||
|
||||
sudo wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/install-ngxblocker -O /usr/sbin/install-ngxblocker
|
||||
sudo wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/setup-ngxblocker -O /usr/sbin/setup-ngxblocker
|
||||
sudo wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/update-ngxblocker -O /usr/sbin/update-ngxblocker
|
||||
|
||||
# Set our install and setup scripts to be executable
|
||||
|
||||
sudo chmod +x /usr/sbin/install-ngxblocker
|
||||
sudo chmod +x /usr/sbin/setup-ngxblocker
|
||||
sudo chmod +x /usr/sbin/update-ngxblocker
|
||||
|
||||
# Run Install-NgxBlocker
|
||||
|
||||
cd /usr/sbin
|
||||
sudo ./install-ngxblocker -x
|
||||
|
||||
# Copy our default.vhost file into Nginx /sites-available/
|
||||
|
||||
sudo cp $TRAVIS_BUILD_DIR/travisCI/default.vhost /etc/nginx/sites-available/default.vhost
|
||||
|
||||
# Link the vhost file into Nginx /sites-enabled/ and reload nginx
|
||||
|
||||
sudo ln -s /etc/nginx/sites-available/default.vhost /etc/nginx/sites-enabled/default.vhost
|
||||
|
||||
# Run setup-ngxblocker
|
||||
|
||||
cd /usr/sbin
|
||||
sudo ./setup-ngxblocker -x
|
||||
|
||||
# NOTE: for Verbose Testing of any shell scripts use below format adding sh -x before running the script
|
||||
# this helps a lot inside the TravisCI environment to see where a shell script may be failing
|
||||
#sudo sh -x ./setup-ngxblocker -x
|
||||
|
||||
# Load our Nginx.conf file
|
||||
|
||||
sudo nginx -c /etc/nginx/nginx.conf
|
||||
|
||||
# Copy our index.php file into the default site's root folder
|
||||
|
||||
sudo cp $TRAVIS_BUILD_DIR/travisCI/index.php /var/www/html/index.php
|
||||
|
||||
# Run update-ngxblocker test which downloads latest globalblacklist.conf and reload Nginx
|
||||
|
||||
cd /usr/sbin
|
||||
sudo ./update-ngxblocker -e mitchellkrog@gmail.com
|
||||
|
||||
# Set all our other setup and deploy scripts to be executable
|
||||
|
||||
sudo chmod +x $TRAVIS_BUILD_DIR/travisCI/modify-globalblacklist.sh
|
||||
sudo chmod +x $TRAVIS_BUILD_DIR/travisCI/modify-readme.sh
|
||||
sudo chmod +x $TRAVIS_BUILD_DIR/travisCI/deploy-package.sh
|
||||
sudo chmod +x $TRAVIS_BUILD_DIR/travisCI/modify-files-and-commit.sh
|
||||
|
||||
# Travis now moves into running the rest of the tests in the script: section of .travis.yml
|
|
@ -1,31 +0,0 @@
|
|||
#!/bin/bash
|
||||
YEAR=$(date +"%Y")
|
||||
MONTH=$(date +"%m")
|
||||
cd $TRAVIS_BUILD_DIR
|
||||
|
||||
#Remove Remotes Added by TravisCI
|
||||
git remote rm origin
|
||||
|
||||
#Add Remote with Secure Key
|
||||
git remote add origin https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
|
||||
|
||||
#List Remotes ONLY DURING testing - do not do this on live repo / possible key leak
|
||||
#git remote -v
|
||||
|
||||
# Set Git Variables
|
||||
git config --global user.email "${GIT_EMAIL}"
|
||||
git config --global user.name "${GIT_NAME}"
|
||||
git config --global push.default simple
|
||||
|
||||
# Make sure we have master branch checked out in Git
|
||||
git checkout master
|
||||
|
||||
# Modify our files with build and version information
|
||||
sudo $TRAVIS_BUILD_DIR/travisCI/modify-globalblacklist.sh
|
||||
sudo $TRAVIS_BUILD_DIR/travisCI/modify-readme.sh
|
||||
|
||||
# Add the modified files and commit
|
||||
git add -A
|
||||
git commit -am "V3.$YEAR.$MONTH.$TRAVIS_BUILD_NUMBER [ci skip]"
|
||||
|
||||
# Travis now moves to the before_deploy: section of .travis.yml
|
|
@ -1,79 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Write Build Number Information into globalblacklist.conf
|
||||
# Created by: https://github.com/mitchellkrogza (mitchellkrog@gmail.com)
|
||||
# Copyright: Mitchell Krog - https://github.com/mitchellkrogza
|
||||
|
||||
# Start time of script generation
|
||||
#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
|
||||
|
||||
# Declare Nginx template and temp variables
|
||||
_tmpnginxA=tmpnginxA
|
||||
_tmpnginxB=tmpnginxB
|
||||
|
||||
# Start and End Strings to Search for to do inserts into template
|
||||
_startmarker="### Version Information #"
|
||||
_endmarker="### Version Information ##"
|
||||
|
||||
# PRINT VERSION INFORMATION INTO GLOBALBLACKLIST FILE 1
|
||||
# *****************************************************
|
||||
LASTUPDATEIFS=$IFS
|
||||
IFS=$'\n'
|
||||
now="$(date)"
|
||||
end=$(date +%s.%N)
|
||||
echo $_startmarker >> $_tmpnginxA
|
||||
#runtime=$(python -c "print(${end} - ${start})")
|
||||
printf "###################################################\n### Version: "$MY_GIT_TAG"\n### Updated: "$now"\n### Bad Referrer Count: "$BAD_REFERRERS"\n### Bad Bot Count: "$BAD_BOTS"\n###################################################\n" >> $_tmpnginxA
|
||||
echo $_endmarker >> $_tmpnginxA
|
||||
IFS=$LASTUPDATEIFS
|
||||
mv $_tmpnginxA $_inputdbA
|
||||
ed -s $_inputdbA<<\IN
|
||||
1,/### Version Information #/d
|
||||
/### Version Information ##/,$d
|
||||
,d
|
||||
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/conf.d/globalblacklist.conf
|
||||
/### Version Information #/x
|
||||
.t.
|
||||
.,/### Version Information ##/-d
|
||||
#,p
|
||||
#,p used to print output replaced with w below to write
|
||||
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/conf.d/globalblacklist.conf
|
||||
q
|
||||
IN
|
||||
rm $_inputdbA
|
||||
|
||||
# PRINT VERSION INFORMATION INTO GLOBALBLACKLIST FILE 2
|
||||
# *****************************************************
|
||||
LASTUPDATE2IFS=$IFS
|
||||
IFS=$'\n'
|
||||
now="$(date)"
|
||||
end=$(date +%s.%N)
|
||||
echo $_startmarker >> $_tmpnginxB
|
||||
#runtime=$(python -c "print(${end} - ${start})")
|
||||
printf "###################################################\n### Version: "$MY_GIT_TAG"\n### Updated: "$now"\n### Bad Referrer Count: "$BAD_REFERRERS"\n### Bad Bot Count: "$BAD_BOTS"\n###################################################\n" >> $_tmpnginxB
|
||||
echo $_endmarker >> $_tmpnginxB
|
||||
IFS=$LASTUPDATE2IFS
|
||||
mv $_tmpnginxB $_inputdbA
|
||||
ed -s $_inputdbA<<\IN
|
||||
1,/### Version Information #/d
|
||||
/### Version Information ##/,$d
|
||||
,d
|
||||
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/_sample_config_files/Engintron_for_cPanel_WHM_Configuration_Example/etc/nginx/conf.d/globalblacklist.conf
|
||||
/### Version Information #/x
|
||||
.t.
|
||||
.,/### Version Information ##/-d
|
||||
#,p
|
||||
#,p used to print output replaced with w below to write
|
||||
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/_sample_config_files/Engintron_for_cPanel_WHM_Configuration_Example/etc/nginx/conf.d/globalblacklist.conf
|
||||
q
|
||||
IN
|
||||
rm $_inputdbA
|
||||
|
||||
exit 0
|
|
@ -1,104 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Write Build / Version Number into README.md
|
||||
# Created by: https://github.com/mitchellkrogza (mitchellkrog@gmail.com)
|
||||
# Copyright: Mitchell Krog - https://github.com/mitchellkrogza
|
||||
|
||||
# Start time of script generation
|
||||
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
|
||||
_tmpnginxA=tmpnginxA
|
||||
|
||||
# Start and End Strings to Search for to do inserts into template
|
||||
_startmarker="##### Version Information #"
|
||||
_endmarker="##### Version Information ##"
|
||||
|
||||
# PRINT VERSION INFORMATION INTO README.md
|
||||
# ****************************************
|
||||
LASTUPDATEIFS=$IFS
|
||||
IFS=$'\n'
|
||||
now="$(date)"
|
||||
end=$(date +%s.%N)
|
||||
echo $_startmarker >> $_tmpnginxA
|
||||
runtime=$(python -c "print(${end} - ${start})")
|
||||
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
|
||||
ed -s $_inputdbA<<\IN
|
||||
1,/##### Version Information #/d
|
||||
/##### Version Information ##/,$d
|
||||
,d
|
||||
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/README.md
|
||||
/##### Version Information #/x
|
||||
.t.
|
||||
.,/##### Version Information ##/-d
|
||||
#,p
|
||||
#,p used to print output replaced with w below to write
|
||||
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/README.md
|
||||
q
|
||||
IN
|
||||
rm $_inputdbA
|
||||
|
||||
# PRINT VERSION INFORMATION INTO AUTO-CONFIGURATION.md
|
||||
# ****************************************************
|
||||
LASTUPDATEIFS2=$IFS
|
||||
IFS=$'\n'
|
||||
now="$(date)"
|
||||
end=$(date +%s.%N)
|
||||
echo $_startmarker >> $_tmpnginxA
|
||||
runtime=$(python -c "print(${end} - ${start})")
|
||||
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=$LASTUPDATEIFS2
|
||||
mv $_tmpnginxA $_inputdbA
|
||||
ed -s $_inputdbA<<\IN
|
||||
1,/##### Version Information #/d
|
||||
/##### Version Information ##/,$d
|
||||
,d
|
||||
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/AUTO-CONFIGURATION.md
|
||||
/##### Version Information #/x
|
||||
.t.
|
||||
.,/##### Version Information ##/-d
|
||||
#,p
|
||||
#,p used to print output replaced with w below to write
|
||||
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/AUTO-CONFIGURATION.md
|
||||
q
|
||||
IN
|
||||
rm $_inputdbA
|
||||
|
||||
# PRINT VERSION INFORMATION INTO MANUAL-CONFIGURATION.md
|
||||
# ******************************************************
|
||||
LASTUPDATEIFS3=$IFS
|
||||
IFS=$'\n'
|
||||
now="$(date)"
|
||||
end=$(date +%s.%N)
|
||||
echo $_startmarker >> $_tmpnginxA
|
||||
runtime=$(python -c "print(${end} - ${start})")
|
||||
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=$LASTUPDATEIFS3
|
||||
mv $_tmpnginxA $_inputdbA
|
||||
ed -s $_inputdbA<<\IN
|
||||
1,/##### Version Information #/d
|
||||
/##### Version Information ##/,$d
|
||||
,d
|
||||
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/MANUAL-CONFIGURATION.md
|
||||
/##### Version Information #/x
|
||||
.t.
|
||||
.,/##### Version Information ##/-d
|
||||
#,p
|
||||
#,p used to print output replaced with w below to write
|
||||
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/MANUAL-CONFIGURATION.md
|
||||
q
|
||||
IN
|
||||
rm $_inputdbA
|
||||
|
||||
|
||||
exit 0
|
Loading…
Add table
Reference in a new issue