memberPlumbing/systemd/systemd-email

12 lines
230 B
Plaintext
Raw Normal View History

#!/bin/bash
/usr/sbin/sendmail -t <<ERRMAIL
To: $1
From: systemd <root@$HOSTNAME>
Subject: $2 failed on $(hostname)
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8
$(systemctl status --full "$2")
ERRMAIL