Commit graph

6 commits

Author SHA1 Message Date
Stuart Cardall
b102e561ea
setup-ngxblocker: fix check_wildcard() / improve formatting
fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/pull/45
2017-05-01 16:29:30 +00:00
Stuart Cardall
f3cf01e2ad
setup-ngxblocker: add check_wildcard() / $VHOST_INCLUDES
add check_wildcard() to setup-ngxblocker
add $VHOST_INCLUDES to include_filelist.txt

fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/pull/43
2017-04-29 02:45:28 +00:00
Stuart Cardall
4afe3094ea
fix dash shell compatibilities install / setup-ngxblocker
fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/39

also fixes a small spacing bug in setup-ngxblocker => nginx.conf
2017-04-27 19:28:10 +00:00
Stuart Cardall
59c34aebe7 setup-ngxblocker: use getopts not getopt
long options for the command line are removed. getopt is replaced with
the newer getopts (which is compatible with Debian's DASH Shell)

* fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/35

* adds sanity checks for user command line switches
2017-04-26 15:55:40 +00:00
Stuart Cardall
6fb21ebb61 setup-ngxblocker: update for new file structure
setup-ngxblocker now also sources include_filelist.txt
2017-04-21 22:07:26 +00:00
Stuart Cardall
82282b5284 add a setup script to insert the required includes
the script will try to insert the new configuration below any
existing includes in your config files. If the search string is
not found the inserts are made at the end of the start search
range:

* for vhost files this is below the server_* directives.
* for nginx.conf this is below http{

The search ranges & search string can be changed in main().

usage instructions can be found by running:

setup-ngxblocker -h or --help

by default running the script with no command line switches does a
"dry run" & prints to stdout the files & includes it would change:

setup-ngxblocker

to actually make changes you need to run with -x:

setup-ngxblocker -x
2017-04-15 19:35:59 +00:00