adjust staubsauger.sh to work on Arch Linux

main
Dominic Reich 5 months ago
parent 66b74d1619
commit a5fb52c0f9
Signed by: dominic
GPG Key ID: BC9D6AE1A3BE169A

@ -8,7 +8,6 @@ to_report='Admin email <@>'
from='Staubsauger-Erinnerung <staubsauger-erinnerung@oe7drt.com>';
subject=`printf "Staubsauger-Erinnerung vom %s" "$date"`;
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"`;
# Some default values
@ -102,13 +101,13 @@ if [ $send == "yes" ]; then
# es wird eine benachrichtigung versendet
if [ $sendcc == "yes" ]; then
# 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
# 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
# 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}"

Loading…
Cancel
Save