update-ngxblocker: detect /bin/mail in centos

* also detect /bin/mail in centos

closes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/97
This commit is contained in:
Stuart Cardall 2017-09-19 22:31:54 +00:00
parent 26d03bd7f1
commit 6af2dc7f92
No known key found for this signature in database
GPG key ID: AEB857F1C891D0C6

View file

@ -194,8 +194,8 @@ check_args() {
}
check_mail_depends() {
if [ ! -f /usr/bin/mail ]; then # mailx + ssmtp are enough to send emails
printf "${BOLDYELLOW}WARN${RESET}: missing /usr/bin/mail => ${BOLDWHITE}disabling emails${RESET}.\n\n"
if [ ! -f /usr/bin/mail ] && [ ! -f /bin/mail ]; then # mailx + ssmtp are enough to send emails
printf "${BOLDYELLOW}WARN${RESET}: missing mail command => ${BOLDWHITE}disabling emails${RESET}.\n\n"
SEND_EMAIL="N"
fi
}