From c02a59d52341fef12699e3b784d75eda41e05e28 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 14 Nov 2023 22:16:04 -0600 Subject: [PATCH] Update certs.inc --- inc/certs.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/certs.inc b/inc/certs.inc index 8915cdbf..83af7300 100755 --- a/inc/certs.inc +++ b/inc/certs.inc @@ -614,14 +614,15 @@ CHECK-CERTS(){ CERTVALID=$(echo ${CERTINFO} | awk -F' valid' '{print $1}') CERTVALID=${CERTVALID: -1} CERTDAYS=${CERTINFO#*days=} + echo -e "${HOST} = ${CERTVALID}-${CERTDAYS}\n${CERTINFO}\n\n" if [ "${CERTVALID}" == "0" ] || [ "${CERTVALID}" == "E" ]; then printf "%-30s: %s\n" "${HOST}" "SSL is not valid" SENDNOTICE "SSL Not Valid" "The (${HOST}) SSL is not valid" 1 - + elif [ ${CERTDAYS} -lt 1 ]; then printf "%-30s: %s\n" "${HOST}" "SSL Expired! (${CERTDAYS} days)" SENDNOTICE "SSL Expired" "The (${HOST}) SSL is expired!! (${CERTDAYS} days)" 2 - + elif [ ${CERTDAYS} -lt 15 ]; then printf "%-30s: %s\n" "${HOST}" "SSL is expiring in $CERTDAYS days!" SENDNOTICE "SSL Expiring" "The (${HOST}) SSL is expiring in ${CERTDAYS} days" 1