From fa873a3e208bc8e3c75996af8ec06d9c36a20a91 Mon Sep 17 00:00:00 2001 From: Stuart Cardall Date: Thu, 8 Feb 2018 09:56:34 +0000 Subject: [PATCH] install to /usr/local/sbin by default fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/133 --- install-ngxblocker | 10 +++++----- setup-ngxblocker | 2 +- update-ngxblocker | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/install-ngxblocker b/install-ngxblocker index d9884adc1..03ba620e0 100755 --- a/install-ngxblocker +++ b/install-ngxblocker @@ -23,18 +23,18 @@ ### You can also now use a setup script contributed by Stuart Cardall to automatically insert the includes for you ### See - https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/setup-ngxblocker -# Save this file as /usr/sbin/install-ngxblocker -# sudo wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/install-ngxblocker -O /usr/sbin/install-ngxblocker +# Save this file as /usr/local/sbin/install-ngxblocker +# sudo wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/install-ngxblocker -O /usr/local/sbin/install-ngxblocker # Make it Executable: -# chmod 700 /usr/sbin/install-ngxblocker +# chmod 700 /usr/local/sbin/install-ngxblocker # Run it from the command line: -# sudo /usr/sbin/install-ngxblocker [ -h ] +# sudo /usr/local/sbin/install-ngxblocker [ -h ] ######## LETS INSTALL NOW ############################### CONF_DIR=/etc/nginx/conf.d BOTS_DIR=/etc/nginx/bots.d -SCRIPT_DIR=/usr/sbin +SCRIPT_DIR=/usr/local/sbin REPO=https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master ####### end user configuration ########################## diff --git a/setup-ngxblocker b/setup-ngxblocker index de9643193..32ab5b01b 100755 --- a/setup-ngxblocker +++ b/setup-ngxblocker @@ -12,7 +12,7 @@ VHOST_DIR=/etc/nginx/sites-available BOTS_DIR=/etc/nginx/bots.d CONF_DIR=/etc/nginx/conf.d MAIN_CONF=/etc/nginx/nginx.conf -INSTALLER=/usr/sbin/install-ngxblocker +INSTALLER=/usr/local/sbin/install-ngxblocker # setting Y / yes will whitelist only directories in $www # that look like domain.names DOT_NAMES="Y" diff --git a/update-ngxblocker b/update-ngxblocker index 0e59557c3..c78243bd4 100755 --- a/update-ngxblocker +++ b/update-ngxblocker @@ -20,10 +20,10 @@ # PLEASE READ UPDATED CONFIGURATION INSTRUCTIONS BEFORE USING THIS -# Save this file as /usr/sbin/update-ngxblocker -# cd /usr/sbin +# Save this file as /usr/local/sbin/update-ngxblocker +# cd /usr/local/sbin # sudo wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/update-ngxblocker -O update-ngxblocker -# Make it Executable chmod 700 /usr/sbin/update-ngxblocker +# Make it Executable chmod 700 /usr/local/sbin/update-ngxblocker # RUN THE UPDATE # Here our script runs, pulls the latest update, reloads nginx and emails you a notification @@ -32,7 +32,7 @@ EMAIL="me@myemail.com" SEND_EMAIL="N" CONF_DIR=/etc/nginx/conf.d BOTS_DIR=/etc/nginx/bots.d -INSTALLER=/usr/sbin/install-ngxblocker +INSTALLER=/usr/local/sbin/install-ngxblocker ##### end user configuration ############################################################## @@ -359,13 +359,13 @@ exit $? # Add this as a cron to run daily / weekly as you like # Here's a sample CRON entry to update every day at 10pm -# 00 22 * * * sudo /usr/sbin/update-ngxblocker -q +# 00 22 * * * sudo /usr/local/sbin/update-ngxblocker -q # Here's another example to run it daily at midday using a command line switch to set the email address for the notification -# 00 12 * * * sudo /usr/sbin/update-ngxblocker -e yourname@youremailprovider.com +# 00 12 * * * sudo /usr/local/sbin/update-ngxblocker -e yourname@youremailprovider.com # Less verbose logging to a system alias mail address (root crontab) -# 00 12 * * * /usr/sbin/update-ngxblocker -q -m webmaster +# 00 12 * * * /usr/local/sbin/update-ngxblocker -q -m webmaster # better logging for cron jobs: # https://serverfault.com/questions/137468/better-logging-for-cronjobs-send-cron-output-to-syslog