mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-04 03:29:57 +00:00
install-ngxblocker: add check_depends()
centos 7 does not have wget by default so check depends.
This commit is contained in:
parent
e6af6d7fb6
commit
13a4fbb0d7
1 changed files with 10 additions and 1 deletions
|
@ -208,6 +208,14 @@ wget_opts() {
|
||||||
echo $opts
|
echo $opts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_depends() {
|
||||||
|
# centos does not have wget installed by default
|
||||||
|
if ! wget --help >/dev/null 2>&1; then
|
||||||
|
printf "$0 requires: wget \n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
check_online() {
|
check_online() {
|
||||||
local url=$1 options=$(wget_opts)
|
local url=$1 options=$(wget_opts)
|
||||||
|
|
||||||
|
@ -225,6 +233,8 @@ main() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
check_depends
|
||||||
|
|
||||||
# parse command line
|
# parse command line
|
||||||
get_options $@
|
get_options $@
|
||||||
include_url=$REPO/include_filelist.txt
|
include_url=$REPO/include_filelist.txt
|
||||||
|
@ -270,4 +280,3 @@ exit $?
|
||||||
# PLEASE ALSO SEE THE SETUP SCRIPT TO INSERT THE NECESSARY INCLUDES FOR YOU
|
# PLEASE ALSO SEE THE SETUP SCRIPT TO INSERT THE NECESSARY INCLUDES FOR YOU
|
||||||
### You can now use a setup script contributed by Stuart Cardall to automatically add the includes for you
|
### You can now use a setup script contributed by Stuart Cardall to automatically add the includes for you
|
||||||
### See - https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/setup-ngxblocker
|
### See - https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/setup-ngxblocker
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue