Skip to content

A systemd unit for sending e-mail notifications in case of failure.

License

Notifications You must be signed in to change notification settings

nchevsky/systemd-send-mail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

  1. Install to /etc/systemd/system:

  2. Optionally configure recipient's and sender's e-mail addresses in send-mail:

    These default to root@<hostname> and <failed-unit-user>@<hostname>.

  3. Add to the unit(s) of whose failures you would like to be notified:

    [Unit]
    ...
    OnFailure=send-mail@%N.service
    ...
    
  4. Reload the modified unit(s):

    $ sudo systemctl daemon-reload
    

About

A systemd unit for sending e-mail notifications in case of failure.

Resources

License

Stars

Watchers

Forks

Languages