mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 18:50:13 +00:00
Merge pull request #338 from mitchellkrogza/alpine
add pidof to required depends
This commit is contained in:
commit
b7fce78d25
1 changed files with 13 additions and 6 deletions
|
@ -258,13 +258,20 @@ find_binary() {
|
|||
|
||||
check_depends() {
|
||||
# some distros do not have these tools installed by default
|
||||
if [ -z $(find_binary wget) ]; then
|
||||
printf "$0 requires: 'wget' \n"
|
||||
local x= depends_list="wget curl"
|
||||
|
||||
for x in $depends_list; do
|
||||
if [ -z $(find_binary $x) ]; then
|
||||
printf "$0 requires: '$x' \n"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z $(find_binary curl) ]; then
|
||||
printf "$0 requires 'curl' \n"
|
||||
# give a helpful message for missing pidof
|
||||
if [ -z $(find_binary pidof) ]; then
|
||||
printf "$0 requires 'pidof' \n\n"
|
||||
printf "In Debian: apt install sysvinit-utils\n"
|
||||
printf "In Centos: yum install sysvinit-tools\n"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue