summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcrypt-expiry-check.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypt-expiry-check.in b/crypt-expiry-check.in
index 3c0a79b..c431099 100755
--- a/crypt-expiry-check.in
+++ b/crypt-expiry-check.in
@@ -125,7 +125,11 @@ set_retcode()
#####################################################################
prints()
{
- MIN_DATE=$(echo $4 | ${AWK} '{ print $1, $2, $4 }')
+ if echo "$4" | ${GREP} -qx '[0-9]\+'; then
+ MIN_DATE=$(${DATE} '+%b %d %Y' -d@$4)
+ else
+ MIN_DATE=$(echo $4 | ${AWK} '{ print $1, $2, $4 }')
+ fi
if ${ISSUER} && ! ${VALIDATION}
then
if ${NAGIOS}