23 lines
395 B
Plaintext
23 lines
395 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
. ./helpers/template
|
||
|
|
||
|
export BOUNDARY="-$(date | md5sum | cut -d ' ' -f 1)"
|
||
|
|
||
|
(
|
||
|
render_template mail
|
||
|
|
||
|
if [ -n "$MUNIN_DIRECTORY" -a -d "$MUNIN_DIRECTORY" ]; then
|
||
|
cd "$MUNIN_DIRECTORY"
|
||
|
|
||
|
for file in *day.png; do
|
||
|
export file
|
||
|
export base64="$(base64 "$file")"
|
||
|
|
||
|
render_template mail-png-attachment
|
||
|
done
|
||
|
fi
|
||
|
|
||
|
printf "\n--%s--\n" "$BOUNDARY"
|
||
|
) | sendmail "$EMAIL_RECIPIENT"
|