mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-09 05:54:13 +00:00
GHA workflow - Beta Tests / Isolate Working Dir [skip travis]
Ref: #419
This commit is contained in:
parent
4305011d86
commit
1c41481ae5
5 changed files with 74 additions and 60 deletions
|
@ -16,6 +16,8 @@
|
|||
# #
|
||||
##############################################################################
|
||||
|
||||
export TERM=xterm
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# MIT License
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -64,7 +66,7 @@ printf "\n"
|
|||
echo "${bold}${green}---------------"
|
||||
echo "${bold}${green}Reloading Nginx"
|
||||
echo "${bold}${green}---------------"
|
||||
sudo nginx -t && sudo nginx -s reload
|
||||
sudo nginx -t && sudo systemctl reload nginx
|
||||
}
|
||||
|
||||
waitforReload () {
|
||||
|
@ -80,10 +82,10 @@ echo "${bold}${green}-------------------------------------------------------"
|
|||
echo "${bold}${green}Backup all conf files and folders used during this test"
|
||||
echo "${bold}${green}-------------------------------------------------------"
|
||||
printf "\n"
|
||||
sudo cp /etc/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files/bots.d/
|
||||
sudo cp /etc/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files/conf.d/
|
||||
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files/default.vhost
|
||||
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files/nginx.conf
|
||||
sudo cp /etc/nginx/bots.d/* ./dev-tools/beta_conf_files/bots.d/
|
||||
sudo cp /etc/nginx/conf.d/* ./dev-tools/beta_conf_files/conf.d/
|
||||
sudo cp /etc/nginx/sites-available/default.vhost ./dev-tools/beta_conf_files/default.vhost
|
||||
sudo cp /etc/nginx/nginx.conf ./dev-tools/beta_conf_files/nginx.conf
|
||||
}
|
||||
|
||||
resetNginx () {
|
||||
|
@ -104,8 +106,7 @@ echo "${bold}${magenta}-------------------------"
|
|||
echo "${bold}${magenta}Execute update-ngxblocker"
|
||||
echo "${bold}${magenta}-------------------------"
|
||||
printf "\n"
|
||||
cd /usr/sbin
|
||||
sudo bash ./update-ngxblocker -n
|
||||
sudo bash /usr/sbin/update-ngxblocker -n
|
||||
}
|
||||
|
||||
copyTestUnit () {
|
||||
|
@ -114,8 +115,7 @@ echo "${bold}${yellow}---------------------------------------------------"
|
|||
echo "${bold}${yellow}Copy Test Unit of globalblacklist.conf file to test"
|
||||
echo "${bold}${yellow}---------------------------------------------------"
|
||||
printf "\n"
|
||||
#sudo cp ${TRAVIS_BUILD_DIR}/conf.d/globalblacklist-testing-version.conf /etc/nginx/conf.d/globalblacklist.conf
|
||||
sudo cp ${TRAVIS_BUILD_DIR}/conf.d/globalblacklist-testing-version-oldregexboundaries.conf /etc/nginx/conf.d/globalblacklist.conf
|
||||
sudo cp ./conf.d/globalblacklist-testing-version-oldregexboundaries.conf /etc/nginx/conf.d/globalblacklist.conf
|
||||
}
|
||||
|
||||
# -------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue