mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 10:40:36 +00:00
[BETA] Revert setup-ngxblocker changes
This commit is contained in:
parent
7201123b26
commit
0ecaeb1d67
1 changed files with 15 additions and 2 deletions
|
@ -439,9 +439,22 @@ main() {
|
|||
|
||||
# update vhosts
|
||||
for file in $FILE_LIST; do
|
||||
#line=$(find_includes $file include last server_ last location first )
|
||||
line=$(sed -n '/server_//}/p' $file)
|
||||
line=$(find_includes $file include last server_ last location first )
|
||||
#line=$(sed -n '/server_/,/}/p')
|
||||
#line='/server_/,/}/'
|
||||
|
||||
#if ! sed -n "${line}p" $file | grep -Ew ^[[:space:]]+root 1>/dev/null; then
|
||||
# text="include $conf_dir/$(echo $include_list | awk '{print $1}');"
|
||||
# sed -i "s|$text|$text\n|" $file
|
||||
#fi
|
||||
|
||||
#add comment above inserts
|
||||
#text="include $conf_dir/$(echo $include_list | awk '{print $NF}');"
|
||||
#sed -i "s|$text|\n\n ##\n # Nginx Bad Bot Blocker Includes\n # REPO: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker\n ##\n\t$text|" $file
|
||||
|
||||
|
||||
|
||||
#ORIGINAL CODE
|
||||
if [ -n "$(check_wildcard $file $BOTS_DIR)" ]; then
|
||||
# do not use wildcards in vhost files
|
||||
printf "%-10s %-${col_size}s %s\n" "WARN:" "$BOTS_DIR/* detected" "=> $file"
|
||||
|
|
Loading…
Add table
Reference in a new issue