homeserver/roles/mgrote_rsync/templates/rsync_mirror_log.sh.j2
Michael Grote d3814000f9
All checks were successful
ansible-lint / gitleaks (push) Successful in 9s
ansible-lint / Ansible Lint (push) Successful in 1m0s
rsync_mirror: add better logging (#230)
Reviewed-on: #230
2024-11-11 13:35:12 +01:00

5 lines
383 B
Django/Jinja

#!/bin/bash
{{ file_header | default () }}
/usr/bin/journalctl -u rsync_mirror.service -xe | grep -E '\-----------------------|Source:|Literal data:|matched data:|sent:' | tail -n {{ rsync_mirror_dirs | length * 5 }} | mail -aFROM:{{ rsync_mirror_user }}@mgrote.net -s "rsync_mirror - $HOSTNAME" {{ my_mail }}
{# Anzahl der Elemente mal 5, da jeweils 5 Zeilen ausgegeben werden #}