Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/systemd-email
diff options
context:
space:
mode:
Diffstat (limited to 'bin/systemd-email')
-rwxr-xr-xbin/systemd-email21
1 files changed, 21 insertions, 0 deletions
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