diff --git a/run.sh b/run.sh index 1b2e51ba8adcb1940c0e8f9f13920266dba2de9d..f1769468bae224ee13431ee185bf8f2ace271cd2 100755 --- a/run.sh +++ b/run.sh @@ -2,6 +2,12 @@ cd /usr/src/app +if [ -z "${TO_MAIL}" ] +then +echo "TO_MAIL not set." +exit 1 +fi + function preview { (>&2 echo "run twitter") @@ -20,8 +26,8 @@ function preview { } -#if [ ! -z "$OUTPUT" ] -#then +if [ ! -z "$OUTPUT" ] +then (cat << EOF Subject: Programm-Info-Bot Content-Type: text/plain; charset=UTF-8 @@ -30,4 +36,4 @@ $(preview)" EOF ) | msmtp ${MSMTP_ARGUMENTS} ${TO_MAIL} -#fi +fi