summaryrefslogtreecommitdiff
path: root/crypt-expiry-check.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-01-09 08:51:15 +0100
committerErich Eckner <git@eckner.net>2019-01-09 08:51:15 +0100
commit8345e2f31255b81aaf7676c2762d23ff7de28636 (patch)
tree57eeac8fb2456c71f8cf64037263243693b2e9f4 /crypt-expiry-check.in
parent85bd238da73a168769ea65d63306608222944e2a (diff)
downloadcrypt-expiry-check-8345e2f31255b81aaf7676c2762d23ff7de28636.tar.xz
crypt-expiry-check.in: print hostname in greeting to make debugging fatal errors easier
Diffstat (limited to 'crypt-expiry-check.in')
-rwxr-xr-xcrypt-expiry-check.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypt-expiry-check.in b/crypt-expiry-check.in
index aade444..100ff0c 100755
--- a/crypt-expiry-check.in
+++ b/crypt-expiry-check.in
@@ -84,6 +84,7 @@ SORT=$(which sort)
TAIL=$(which tail)
MKTEMP=$(which mktemp)
GPG=$(which gpg)
+HOSTNAME=$(hostname)
# Try to find a mail client
MAIL="cantfindit"
@@ -180,7 +181,7 @@ print_heading()
${PRINTF} "\n%-35s %-35s %-32s\n" "Host" "Common Name" "Serial #" >> ${STDOUT_TMP}
echo "----------------------------------- ----------------------------------- --------------------------------" >> ${STDOUT_TMP}
fi
- echo "Dear admin," >> ${MAILOUT_TMP}
+ ${PRINTF} "Dear admin of %s,\n" "${HOSTNAME}" >> ${MAILOUT_TMP}
fi
}