mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-01 18:19:55 +00:00
fix dash incompatibility
fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/pull/135#issuecomment-364082296
This commit is contained in:
parent
baa6b3cb4b
commit
f9e152b7f9
1 changed files with 3 additions and 4 deletions
|
@ -143,7 +143,7 @@ service_cmd() {
|
|||
local x= svc= svc_list="service systemctl rc-service"
|
||||
|
||||
for x in $svc_list; do
|
||||
svc=$(which $svc 2>/dev/null)
|
||||
svc=$(which $x 2>/dev/null)
|
||||
if [ -n "$svc" ]; then
|
||||
case "$x" in
|
||||
service) svc="$svc nginx reload";;
|
||||
|
@ -268,7 +268,7 @@ get_options() {
|
|||
main() {
|
||||
local REPO=https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master
|
||||
local file=globalblacklist.conf remote_dir=conf.d url= output= update= status= tmp= retval=
|
||||
local reload_service=$(service_cmd)
|
||||
local reload_service="$(service_cmd)"
|
||||
|
||||
# require root
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
|
@ -276,10 +276,9 @@ main() {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
check_depends
|
||||
|
||||
# parse command line
|
||||
get_options $@
|
||||
check_depends
|
||||
check_dirs $BOTS_DIR $CONF_DIR
|
||||
url=$REPO/$remote_dir/$file
|
||||
output=$CONF_DIR/$file
|
||||
|
|
Loading…
Add table
Reference in a new issue