data.coop-ansible/roles/docker/templates/restic/failure.sh.j2
Reynir Björnsson 9fb16d3a69 Address comments by @samsapti
We need to use ':' instead of '=' in yaml for environment variable
bindings.
Spurious tab where it should be all spaces
Rename variable mail-from to mail_from to align with existing code style
Nit: change email addresses
2024-03-04 09:20:04 +01:00

15 lines
343 B
Django/Jinja

#!/bin/sh
curl smtp://postfix --mail-from {{ services.restic.mail_from }} --mail-rcpt admin@data.coop --upload-file . << END_OF_MAIL
From: Restic backup <{{ services.restic.mail-from }}>
To: admin-hold@data.coop
Subject: Restic backup failed
Date: $(date)
Dear sir or madam,
Tonight's backup failed!
Best,
Your backup software.
END_OF_MAIL