blob: 4489c8d97afa749eeaf5022cdb6045b62f564b47 (
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)" \
"$(uname -n)"
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 --lines=50 "$1"
} | \
/usr/bin/digest-mailer
|