Commit graph

1 commit

Author SHA1 Message Date
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