homeserver/roles/mgrote_rsync/templates/rsync_mirror_mail.service.j2
Michael Grote fec1e099ea
Some checks failed
ansible-lint / gitleaks (pull_request) Successful in 7s
ansible-lint / Ansible Lint (pull_request) Failing after 1m28s
fdgh
2024-10-28 18:34:25 +01:00

8 lines
313 B
Django/Jinja

{{ file_header | default () }}
[Unit]
Description=Send a Mail for rsync_mirror service after error or success rsync_mirror.service.
[Service]
Type=oneshot
ExecStart=/bin/bash -c '/usr/bin/journalctl -u rsync_mirror.service -n 30 | mail -aFROM:{{ rsync_mirror_user }}@mgrote.net -s "syncoid - %H" {{ my_mail }}'