Updates - using -h and --help flags with setup and install scripts.

This commit is contained in:
Mitchell Krog 2017-05-29 17:11:24 +02:00
parent d1681ed0d9
commit 1213081aa7
2 changed files with 28 additions and 2 deletions

View file

@ -35,7 +35,8 @@ sudo chmod +x setup-ngxblocker
sudo chmod +x update-ngxblocker sudo chmod +x update-ngxblocker
``` ```
All scripts can be run with an -h flag for help options. **Both setup-ngxblocker & install-ngxblocker can be configured with custom installation / update locations from the command line.
Run the scripts with --help or -h to view options.**
## STEP 2: ## STEP 2:
@ -72,6 +73,9 @@ Downloading [FROM]=> [REPO]/bots.d/bad-referrer-words.conf [TO]=> /etc/ngi
Downloading [FROM]=> [REPO]/bots.d/custom-bad-referrers.conf [TO]=> /etc/nginx/bots.d/custom-bad-referrers.conf Downloading [FROM]=> [REPO]/bots.d/custom-bad-referrers.conf [TO]=> /etc/nginx/bots.d/custom-bad-referrers.conf
``` ```
**Both setup-ngxblocker & install-ngxblocker can be configured with custom installation / update locations from the command line.
Run the scripts with --help or -h to view options.**
## STEP 3: ## STEP 3:
Now run the install script with the -x parameter to download all the necessary files from the repository: Now run the install script with the -x parameter to download all the necessary files from the repository:
@ -106,6 +110,9 @@ Downloading [FROM]=> [REPO]/bots.d/custom-bad-referrers.conf [TO]=> /etc/ngi
The required files have now been downloaded to the correct folders on Nginx for you direct from the repository. The required files have now been downloaded to the correct folders on Nginx for you direct from the repository.
**Both setup-ngxblocker & install-ngxblocker can be configured with custom installation / update locations from the command line.
Run the scripts with --help or -h to view options.**
## STEP 4: ## STEP 4:
Now run the setup-ngxblocker script in DRY-MODE which will show you what changes it will make and what files it will download for you. This is only a DRY-RUN so no changes are being made yet. Now run the setup-ngxblocker script in DRY-MODE which will show you what changes it will make and what files it will download for you. This is only a DRY-RUN so no changes are being made yet.
@ -139,6 +146,9 @@ Whitelisting ip: x.x.x.x => /etc/nginx/bots.d/whitelist-ips.conf
This script also whitelists your IP in the whitelist-ips.conf file for you. This script also whitelists your IP in the whitelist-ips.conf file for you.
Further IP's or IP ranges can be added to your customizable whitelits-ips.conf file located in /etc/nginx/bots.d/whitelist-ips.conf. Further IP's or IP ranges can be added to your customizable whitelits-ips.conf file located in /etc/nginx/bots.d/whitelist-ips.conf.
**Both setup-ngxblocker & install-ngxblocker can be configured with custom installation / update locations from the command line.
Run the scripts with --help or -h to view options.**
## STEP 5: ## STEP 5:
Now run the setup script with the -x parameter to make all the necessary changes to your nginx.conf (if required) and also to add the required includes into all your vhost files. Now run the setup script with the -x parameter to make all the necessary changes to your nginx.conf (if required) and also to add the required includes into all your vhost files.
@ -184,6 +194,9 @@ include /etc/nginx/bots.d/ddos.conf;
include /etc/nginx/bots.d/blockbots.conf; include /etc/nginx/bots.d/blockbots.conf;
``` ```
**Both setup-ngxblocker & install-ngxblocker can be configured with custom installation / update locations from the command line.
Run the scripts with --help or -h to view options.**
## STEP 6: ## STEP 6:
Now test your nginx configuration Now test your nginx configuration

View file

@ -45,7 +45,8 @@ sudo chmod +x setup-ngxblocker
sudo chmod +x update-ngxblocker sudo chmod +x update-ngxblocker
``` ```
All scripts can be run with an -h flag for help options. **Both setup-ngxblocker & install-ngxblocker can be configured with custom installation / update locations from the command line.
Run the scripts with --help or -h to view options.**
## STEP 2: ## STEP 2:
@ -83,6 +84,9 @@ Downloading [FROM]=> [REPO]/bots.d/bad-referrer-words.conf [TO]=> /etc/ngi
Downloading [FROM]=> [REPO]/bots.d/custom-bad-referrers.conf [TO]=> /etc/nginx/bots.d/custom-bad-referrers.conf Downloading [FROM]=> [REPO]/bots.d/custom-bad-referrers.conf [TO]=> /etc/nginx/bots.d/custom-bad-referrers.conf
``` ```
**Both setup-ngxblocker & install-ngxblocker can be configured with custom installation / update locations from the command line.
Run the scripts with --help or -h to view options.**
## STEP 3: ## STEP 3:
Now run the install script with the -x parameter to download all the necessary files from the repository: Now run the install script with the -x parameter to download all the necessary files from the repository:
@ -117,6 +121,9 @@ Downloading [FROM]=> [REPO]/bots.d/custom-bad-referrers.conf [TO]=> /etc/ngi
The required files have now been downloaded to the correct folders on Nginx for you direct from the repository. The required files have now been downloaded to the correct folders on Nginx for you direct from the repository.
**Both setup-ngxblocker & install-ngxblocker can be configured with custom installation / update locations from the command line.
Run the scripts with --help or -h to view options.**
## STEP 4: ## STEP 4:
Now run the setup-ngxblocker script in DRY-MODE which will show you what changes it will make and what files it will download for you. This is only a DRY-RUN so no changes are being made yet. Now run the setup-ngxblocker script in DRY-MODE which will show you what changes it will make and what files it will download for you. This is only a DRY-RUN so no changes are being made yet.
@ -150,6 +157,9 @@ Whitelisting ip: x.x.x.x => /etc/nginx/bots.d/whitelist-ips.conf
This script also whitelists your IP in the whitelist-ips.conf file for you. This script also whitelists your IP in the whitelist-ips.conf file for you.
Further IP's or IP ranges can be added to your customizable whitelits-ips.conf file located in /etc/nginx/bots.d/whitelist-ips.conf. Further IP's or IP ranges can be added to your customizable whitelits-ips.conf file located in /etc/nginx/bots.d/whitelist-ips.conf.
**Both setup-ngxblocker & install-ngxblocker can be configured with custom installation / update locations from the command line.
Run the scripts with --help or -h to view options.**
## STEP 5: ## STEP 5:
Now run the setup script with the -x parameter to make all the necessary changes to your nginx.conf (if required) and also to add the required includes into all your vhost files. Now run the setup script with the -x parameter to make all the necessary changes to your nginx.conf (if required) and also to add the required includes into all your vhost files.
@ -195,6 +205,9 @@ include /etc/nginx/bots.d/ddos.conf;
include /etc/nginx/bots.d/blockbots.conf; include /etc/nginx/bots.d/blockbots.conf;
``` ```
**Both setup-ngxblocker & install-ngxblocker can be configured with custom installation / update locations from the command line.
Run the scripts with --help or -h to view options.**
## STEP 6: ## STEP 6:
Now test your nginx configuration Now test your nginx configuration