# This unit is responsible for sending an email # if a duply-related service unit fails # # Make sure running echo test | mail YOURUSER # results in a new email in your inbox. # # You may want to review /etc/aliases to read: # YOURUSER: YOURUSER@YOUR_EMAIL_PROVIDER.com # # If you're using msmtp for instance, then you'll # need to add this line to msmtprc: # aliases /etc/aliases [Unit] Description=Email notification for failed duply systemd units [Service] Type=oneshot ExecStart=/bin/bash -c '/bin/systemctl --user status %i | /usr/bin/mail -s "[SYSTEMD_Notification - %i on %H] Fail" %u'