Skip to content

Instantly share code, notes, and snippets.

@dhollinger
Created July 1, 2019 18:42
Show Gist options
  • Save dhollinger/012c5bbecf98286612b4fca5847df2de to your computer and use it in GitHub Desktop.
Save dhollinger/012c5bbecf98286612b4fca5847df2de to your computer and use it in GitHub Desktop.
Send notifications
[Unit]
Description=Sent email
[Service]
Type=oneshot
ExecStart=/usr/bin/bash -c '/usr/bin/systemctl status %i | /usr/bin/mailx -Ssendwait -s "[SYSTEMD_%i] Fail" [email protected]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment