mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 02:29:58 +00:00
change less verbose option to -q
fixes a clash with the script directory setting in install-ngxblocker
This commit is contained in:
parent
4afde6952d
commit
a416936b61
2 changed files with 9 additions and 9 deletions
|
@ -50,14 +50,14 @@ Usage: $script [OPTIONS]
|
||||||
[ -s ] : Script directory (default: $SCRIPT_DIR)
|
[ -s ] : Script directory (default: $SCRIPT_DIR)
|
||||||
[ -r ] : Change repo url (default: $REPO)
|
[ -r ] : Change repo url (default: $REPO)
|
||||||
[ -x ] : Actually change the files (default: don't change anything)
|
[ -x ] : Actually change the files (default: don't change anything)
|
||||||
[ -s ] : Suppress non error messages
|
[ -q ] : Suppress non error messages
|
||||||
[ -v ] : Print blacklist version
|
[ -v ] : Print blacklist version
|
||||||
[ -h ] : this help message
|
[ -h ] : this help message
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
$script (Don't change anything: display results on stdout)
|
$script (Don't change anything: display results on stdout)
|
||||||
$script -x (Download / update config files)
|
$script -x (Download / update config files)
|
||||||
$script -s (Less verbose messages for cron)
|
$script -q (Less verbose messages for cron)
|
||||||
EOF
|
EOF
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
@ -206,7 +206,7 @@ print_message() {
|
||||||
get_options() {
|
get_options() {
|
||||||
local arg= opts=
|
local arg= opts=
|
||||||
|
|
||||||
while getopts :b:c:s:r:xvsh opts "$@"
|
while getopts :b:c:s:r:xvqh opts "$@"
|
||||||
do
|
do
|
||||||
if [ -n "${OPTARG}" ]; then
|
if [ -n "${OPTARG}" ]; then
|
||||||
case "$opts" in
|
case "$opts" in
|
||||||
|
@ -222,7 +222,7 @@ get_options() {
|
||||||
r) REPO=$arg; check_args $opts url $arg ;;
|
r) REPO=$arg; check_args $opts url $arg ;;
|
||||||
x) DRY_RUN=N ;;
|
x) DRY_RUN=N ;;
|
||||||
v) check_version ;;
|
v) check_version ;;
|
||||||
s) VERBOSE=N ;;
|
q) VERBOSE=N ;;
|
||||||
h) usage ;;
|
h) usage ;;
|
||||||
\?) usage ;;
|
\?) usage ;;
|
||||||
:) check_args $OPTARG none none ;;
|
:) check_args $OPTARG none none ;;
|
||||||
|
|
|
@ -56,7 +56,7 @@ Usage: $script [OPTIONS]
|
||||||
[ -e ] : Change @email address (default: $EMAIL)
|
[ -e ] : Change @email address (default: $EMAIL)
|
||||||
[ -m ] : Change mail (system alias) (default: $EMAIL)
|
[ -m ] : Change mail (system alias) (default: $EMAIL)
|
||||||
[ -n ] : Do not send email report (default: $SEND_EMAIL)
|
[ -n ] : Do not send email report (default: $SEND_EMAIL)
|
||||||
[ -s ] : Suppress non error messages
|
[ -q ] : Suppress non error messages
|
||||||
[ -v ] : Print blacklist version
|
[ -v ] : Print blacklist version
|
||||||
[ -h ] : this help message
|
[ -h ] : this help message
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ Examples:
|
||||||
$script -b /my/custom/bots.d (Download globalblacklist.conf & update with your custom bots.d location)
|
$script -b /my/custom/bots.d (Download globalblacklist.conf & update with your custom bots.d location)
|
||||||
$script -e yourname@youremailaddress.com (Download globalblacklist.conf specifying your email address for the notification)
|
$script -e yourname@youremailaddress.com (Download globalblacklist.conf specifying your email address for the notification)
|
||||||
$script -u /path/to/install-ngxblocker (Use custom path to install-ngxblocker to update bots.d / conf.d include files)
|
$script -u /path/to/install-ngxblocker (Use custom path to install-ngxblocker to update bots.d / conf.d include files)
|
||||||
$script -s -m webmaster (Send mail to a system alias address & give less verbose messages for cron)
|
$script -q -m webmaster (Send mail to a system alias address & give less verbose messages for cron)
|
||||||
EOF
|
EOF
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
@ -227,7 +227,7 @@ print_message() {
|
||||||
get_options() {
|
get_options() {
|
||||||
local arg= opts=
|
local arg= opts=
|
||||||
|
|
||||||
while getopts :c:b:u:r:e:m:nvsh opts "$@"
|
while getopts :c:b:u:r:e:m:nvqh opts "$@"
|
||||||
do
|
do
|
||||||
if [ -n "${OPTARG}" ]; then
|
if [ -n "${OPTARG}" ]; then
|
||||||
case "$opts" in
|
case "$opts" in
|
||||||
|
@ -246,7 +246,7 @@ get_options() {
|
||||||
m) EMAIL=$arg; SEND_EMAIL=Y ;; # /etc/aliases no sanity checks
|
m) EMAIL=$arg; SEND_EMAIL=Y ;; # /etc/aliases no sanity checks
|
||||||
n) SEND_EMAIL=N ;;
|
n) SEND_EMAIL=N ;;
|
||||||
v) check_version; exit 0 ;;
|
v) check_version; exit 0 ;;
|
||||||
s) export VERBOSE=N ;;
|
q) export VERBOSE=N ;;
|
||||||
h) usage ;;
|
h) usage ;;
|
||||||
\?) usage ;;
|
\?) usage ;;
|
||||||
:) check_args $OPTARG none none ;;
|
:) check_args $OPTARG none none ;;
|
||||||
|
@ -351,7 +351,7 @@ exit $?
|
||||||
|
|
||||||
# Add this as a cron to run daily / weekly as you like
|
# Add this as a cron to run daily / weekly as you like
|
||||||
# Here's a sample CRON entry to update every day at 10pm
|
# Here's a sample CRON entry to update every day at 10pm
|
||||||
# 00 22 * * * sudo /usr/sbin/update-ngxblocker
|
# 00 22 * * * sudo /usr/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
|
# 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/sbin/update-ngxblocker -e yourname@youremailprovider.com
|
||||||
|
|
Loading…
Add table
Reference in a new issue