blob: 7cc4a3bfb0644c84465a6b9d31e4927b546c0145 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
|