From 047117b7f6cf4227b14c394d9de9c398cb424392 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 7 Jul 2023 09:19:16 +0200 Subject: calculate MIN_DATE only once --- crypt-expiry-check.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crypt-expiry-check.in b/crypt-expiry-check.in index f81a9fd..3c0a79b 100755 --- a/crypt-expiry-check.in +++ b/crypt-expiry-check.in @@ -125,9 +125,9 @@ set_retcode() ##################################################################### prints() { + MIN_DATE=$(echo $4 | ${AWK} '{ print $1, $2, $4 }') if ${ISSUER} && ! ${VALIDATION} then - MIN_DATE=$(echo $4 | ${AWK} '{ print $1, $2, $4 }') if ${NAGIOS} then ${PRINTF} "%-35s %-17s %-8s %-11s %-4s %-30s\n" "$1:$2" "$6" "$3" "${MIN_DATE}" \|days="$5" @@ -140,7 +140,6 @@ prints() elif ! ${VALIDATION} then - MIN_DATE=$(echo $4 | ${AWK} '{ print $1, $2, $4 }') if ${NAGIOS} then ${PRINTF} "%-47s %-12s %-12s %-4s %-30s\n" "$1:$2" "$3" "${MIN_DATE}" \|days="$5" -- cgit v1.2.3-54-g00ecf