Merge pull request #338 from mitchellkrogza/alpine

add pidof to required depends
This commit is contained in:
Stuart Cardall 2020-01-28 11:09:47 +00:00 committed by GitHub
commit b7fce78d25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -258,13 +258,20 @@ find_binary() {
check_depends() { check_depends() {
# some distros do not have these tools installed by default # some distros do not have these tools installed by default
if [ -z $(find_binary wget) ]; then local x= depends_list="wget curl"
printf "$0 requires: 'wget' \n"
exit 1
fi
if [ -z $(find_binary curl) ]; then for x in $depends_list; do
printf "$0 requires 'curl' \n" if [ -z $(find_binary $x) ]; then
printf "$0 requires: '$x' \n"
exit 1
fi
done
# 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 exit 1
fi fi
} }