Daniel Gibbs il y a 5 ans
Parent
commit
c884f975bc
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      lgsm/functions/alert_email.sh

+ 1 - 1
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}"