homeserver/roles/mgrote_rsync/templates/rsync_mirror_mail.service.j2
Michael Grote 8e0be786b1
Some checks failed
ansible-lint / gitleaks (pull_request) Successful in 13s
ansible-lint / Ansible Lint (pull_request) Failing after 1m25s
sdfgd
2024-10-28 18:35:57 +01:00

8 lines
318 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 "rsync_mirror - %H" {{ my_mail }}'