-
Install to
/etc/systemd/system
:send-mail@.service
: systemd unitsend-mail
: Script invoked bysend-mail@.service
to send an e-mail
-
Optionally configure recipient's and sender's e-mail addresses in
send-mail
:RECIPIENT=jdoe@example.com SENDER=jschmoe@example.com
These default to
root@<hostname>
and<failed-unit-user>@<hostname>
. -
Add to the unit(s) of whose failures you would like to be notified:
[Unit] ... OnFailure=send-mail@%N.service ...
-
Reload the modified unit(s):
$ sudo systemctl daemon-reload
-
-
Notifications
You must be signed in to change notification settings - Fork 1
A systemd unit for sending e-mail notifications in case of failure.
License
nchevsky/systemd-send-mail
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A systemd unit for sending e-mail notifications in case of failure.