#!/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 --lines=50 "$1" } | \ /usr/bin/digest-mailer