index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-07-18 10:56:46 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-07-18 10:56:46 +0200 |
commit | d1f7ea1d254a4edcca52587b8745d3f3fd439218 (patch) | |
tree | a9d46664122154fec48d892576fe6da8dfca5194 /bin/systemd-email | |
parent | ef99097d1f701b68ee7ff7ef24cb49e2f717c43e (diff) |
-rwxr-xr-x | bin/systemd-email | 21 |
diff --git a/bin/systemd-email b/bin/systemd-email new file mode 100755 index 0000000..7cc4a3b --- /dev/null +++ b/bin/systemd-email @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ $# -ne 1 ]; then + >&2 echo 'systemd-email unit-name.service' + >&2 echo ' send an email about a systemd unit' + exit 2 +fi + +{ + printf 'To: archlinux32-logs@eckner.net\n' + printf 'From: systemd <%s@%s>\n' \ + "$(whoami)" \ + "$(hostname)" + printf 'Subject: %s\n' \ + "$1" + printf 'Content-Transfer-Encoding: 8bit\n' + printf 'Content-Type: text/plain; charset=UTF-8\n' + printf '\n' + systemctl --user status --full "$1" +} | \ + /usr/bin/digest-mailer |