From bc66367f5a6b9e9e3be31a913981f428b44fa98d Mon Sep 17 00:00:00 2001 From: Raphael Geissert Date: Fri, 14 Dec 2012 12:25:49 -0600 Subject: Actually send emails on errors and new versions Signed-off-by: Raphael Geissert --- etc/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/common b/etc/common index 687c5fe..0501240 100644 --- a/etc/common +++ b/etc/common @@ -181,7 +181,7 @@ log () { # to the address configured in MAILTO (if non-empty) error () { log "$@" - if [ -z "${MAILTO}" ]; then + if [ -n "${MAILTO}" ]; then echo "$@" | mail -e -s "[$PROGRAM@$(hostname -s)] ERROR [$$]" ${MAILTO} fi } -- cgit v1.2.3