|
|
@ -8,7 +8,6 @@ to_report='Admin email <@>'
|
|
|
|
from='Staubsauger-Erinnerung <staubsauger-erinnerung@oe7drt.com>';
|
|
|
|
from='Staubsauger-Erinnerung <staubsauger-erinnerung@oe7drt.com>';
|
|
|
|
subject=`printf "Staubsauger-Erinnerung vom %s" "$date"`;
|
|
|
|
subject=`printf "Staubsauger-Erinnerung vom %s" "$date"`;
|
|
|
|
subject_report=`printf "[Cron Report] $subject"`;
|
|
|
|
subject_report=`printf "[Cron Report] $subject"`;
|
|
|
|
host=$(/bin/hostname);
|
|
|
|
|
|
|
|
headers=`printf "From: %s\r\nReply-To: %s\r\nContent-Type: text/html; charset=utf-8\r\n" "$from" "$to_report"`;
|
|
|
|
headers=`printf "From: %s\r\nReply-To: %s\r\nContent-Type: text/html; charset=utf-8\r\n" "$from" "$to_report"`;
|
|
|
|
|
|
|
|
|
|
|
|
# Some default values
|
|
|
|
# Some default values
|
|
|
@ -102,13 +101,13 @@ if [ $send == "yes" ]; then
|
|
|
|
# es wird eine benachrichtigung versendet
|
|
|
|
# es wird eine benachrichtigung versendet
|
|
|
|
if [ $sendcc == "yes" ]; then
|
|
|
|
if [ $sendcc == "yes" ]; then
|
|
|
|
# auch an den admin/report
|
|
|
|
# auch an den admin/report
|
|
|
|
echo -e "${headers}\n\n${body}" | /usr/local/bin/mutt -H - -s "${subject}" -- "${to_notification}" "${to_report}"
|
|
|
|
echo -e "${headers}\n\n${body}" | mutt -H - -s "${subject}" -- "${to_notification}" "${to_report}"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
# nur an die notification mail adresse
|
|
|
|
# nur an die notification mail adresse
|
|
|
|
echo -e "${headers}\n\n${body}" | /usr/local/bin/mutt -H - -s "${subject}" -- "${to_notification}"
|
|
|
|
echo -e "${headers}\n\n${body}" | mutt -H - -s "${subject}" -- "${to_notification}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# a report is always sent
|
|
|
|
# a report is always sent
|
|
|
|
echo -e "${headers}\n\n${bodymg}" | /usr/local/bin/mutt -H - -s "${subject_report}" -- "${to_report}"
|
|
|
|
echo -e "${headers}\n\n${bodymg}" | mutt -H - -s "${subject_report}" -- "${to_report}"
|
|
|
|
|
|
|
|
|
|
|
|