Open LorbusChris opened 1 year ago
Support for Email Notifications might be useful. I'm using this via OnFailure=email-notification@%n.service on my servers:
OnFailure=email-notification@%n.service
/usr/libexec/systemd-email-notification:
/usr/libexec/systemd-email-notification
#!/bin/bash set -euo pipefail systemctl status --full "${1}" | mail -Ssendwait -s "systemd Email Notification: ${1}" ${2:-default}
/etc/systemd/system/email-notification@.service:
/etc/systemd/system/email-notification@.service
[Unit] Description=Send status email for %i service [Service] Type=oneshot ExecStart=/usr/libexec/systemd-email-notification %i
Does this need an MTA installed? I assume yes?
it does, yes
If you want to add it in Chris feel free to send a PR. Otherwise, I will try to add it in soon.
Support for Email Notifications might be useful. I'm using this via
OnFailure=email-notification@%n.service
on my servers:/usr/libexec/systemd-email-notification
:/etc/systemd/system/email-notification@.service
: