1
1
Fork 0

add tests and move scripts

Esse commit está contido em:
Simon Vieille 2019-06-12 13:12:53 +02:00
commit c006bbdd30
Assinado por: deblan
ID da chave GPG: 03383D15A1D31745
2 arquivos alterados com 29 adições e 0 exclusões

22
generators/email Executable file
Ver arquivo

@ -0,0 +1,22 @@
#!/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"

7
generators/html Executable file
Ver arquivo

@ -0,0 +1,7 @@
#!/bin/sh
. ./helpers/template
export content="$REPORT"
render_template plain > "$HTML_OUTPUT"