Merge pull request #218 from itoffshore/alpine

add find_binary()
This commit is contained in:
Stuart Cardall 2018-10-08 19:46:21 +01:00 committed by GitHub
commit 2ffc8bcfcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,6 +119,19 @@ check_dirs() {
done
}
find_binary() {
local x= path= bin=$1 bin_paths='/usr/bin /usr/local/bin /usr/sbin /usr/local/sbin /root/bin /root/.bin'
for x in $bin_paths; do
path="$x/$bin"
if [ -x $path ]; then
echo $path
return
fi
done
}
update_paths() {
# variables in nginx include files not currently possible
# updates hard coded bots.d path in globalblacklist.conf