From c884f975bc03eb7af2fd60687be3e93d0bd93556 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 17 Sep 2020 14:50:23 +0100 Subject: [PATCH] if --- lgsm/functions/alert_email.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh index f69f8f408..85c3ee9bc 100755 --- a/lgsm/functions/alert_email.sh +++ b/lgsm/functions/alert_email.sh @@ -9,7 +9,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_print_dots "Sending Email alert: ${email}" fn_sleep_time -if [ "${emailfrom}" ]; then +if [ -n "${emailfrom}" ]; then mail -s "${alertsubject}" -r "${emailfrom}" "${email}" < "${alertlog}" else mail -s "${alertsubject}" "${email}" < "${alertlog}"