From 8345e2f31255b81aaf7676c2762d23ff7de28636 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 9 Jan 2019 08:51:15 +0100 Subject: crypt-expiry-check.in: print hostname in greeting to make debugging fatal errors easier --- crypt-expiry-check.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 } -- cgit v1.2.3-70-g09d2