mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-01 18:19:55 +00:00
update-ngxblocker: fix POSIX shell compatibility / remove wget_opts
* wget_opts() no longer used so removed * use "$*" to pass multiple paramters to POSIX shell
This commit is contained in:
parent
99ee1153e3
commit
801791e65e
1 changed files with 1 additions and 12 deletions
|
@ -104,7 +104,7 @@ check_version() {
|
|||
}
|
||||
|
||||
check_dirs() {
|
||||
local x= dirs="$@"
|
||||
local x= dirs="$*"
|
||||
|
||||
for x in $dirs; do
|
||||
if [ ! -d $x ]; then
|
||||
|
@ -149,17 +149,6 @@ service_cmd() {
|
|||
done
|
||||
}
|
||||
|
||||
wget_opts() {
|
||||
local opts=
|
||||
|
||||
# Busybox wget gives less verbose output by default
|
||||
if [ -n "$(wget --help 2>/dev/null | grep "\-nv")" ]; then
|
||||
opts="-nv"
|
||||
fi
|
||||
|
||||
echo $opts
|
||||
}
|
||||
|
||||
sanitize_path() {
|
||||
echo $1 |tr -cd '[:alnum:] [=@=] [=.=] [=-=] [=/=] [=_=]' \
|
||||
|tr -s '@.-/_' |awk '{print tolower($0)}'
|
||||
|
|
Loading…
Add table
Reference in a new issue