update-ngxblocker: fix dash shell incompatibility

closes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/75

* dash shell need $@ to be quoted
* SCRIPT_DIR is checked by install-ngxblocker so not passed to check_dirs()
This commit is contained in:
Stuart Cardall 2017-08-23 22:13:32 +00:00
parent ea4f48e9ee
commit 26fec015ed
No known key found for this signature in database
GPG key ID: AEB857F1C891D0C6

View file

@ -104,7 +104,7 @@ check_version() {
}
check_dirs() {
local x= dirs=$@
local x= dirs="$@"
for x in $dirs; do
if [ ! -d $x ]; then
@ -274,10 +274,10 @@ main() {
fi
check_depends
check_dirs $BOTS_DIR $CONF_DIR $SCRIPT_DIR
# parse command line
get_options $@
check_dirs $BOTS_DIR $CONF_DIR
url=$REPO/$remote_dir/$file
output=$CONF_DIR/$file