Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-07-18 10:56:46 +0200
committerErich Eckner <git@eckner.net>2018-07-18 10:56:46 +0200
commitd1f7ea1d254a4edcca52587b8745d3f3fd439218 (patch)
treea9d46664122154fec48d892576fe6da8dfca5194
parentef99097d1f701b68ee7ff7ef24cb49e2f717c43e (diff)
bin/systemd-email new
-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