From c5d4f5375e259d5e9cc7a446e9a7646524f6a9af Mon Sep 17 00:00:00 2001 From: srvrco Date: Thu, 25 Aug 2016 12:40:28 +0100 Subject: [PATCH] typo correction --- checkssl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/checkssl b/checkssl index 56aec3e..951e347 100755 --- a/checkssl +++ b/checkssl @@ -30,11 +30,12 @@ # 2016-05-30 Correcting typo (1.01) # 2016-07-20 adding -p option to list possible issues (1.02) # 2016-08-02 remove spaces from domain names (1.03) -# 3016-08-25 updated for use on MAC / FreeBSD. issue #6 (1.04) +# 2016-08-25 updated for use on MAC / FreeBSD. issue #6 (1.04) +# 2016-08-25 typo correction (1.05) # --------------------------------------------------------------------------- PROGNAME=${0##*/} -VERSION="1.04" +VERSION="1.05" ORIGCMD="$0 $*" UPDATE_LOCATION="https://raw.githubusercontent.com/srvrco/checkssl/master/checkssl" @@ -330,12 +331,13 @@ while IFS= read -r DOMAIN; do fi fi if [[ "$ENDDATE" != "-" ]]; then + set -x if [[ "$os" == "bsd" ]]; then - if [[ $(date -v -${RENEW_ALERT}d +%s) -gt $(date -j -f "%b %d %H:%M:%S %Y %Z" "$ENDDATE" +%s) ]]; then + if [[ $(date -v +${RENEW_ALERT}d +%s) -gt $(date -j -f "%b %d %H:%M:%S %Y %Z" "$ENDDATE" +%s) ]]; then PROBLEMS=$(echo "${PROBLEMS}- certificate near renewal date") fi elif [[ "$os" == "mac" ]]; then - if [[ $(date -v -${RENEW_ALERT}d +%s) -gt $(date -j -f "%b %d %H:%M:%S %Y %Z" "$ENDDATE" +%s) ]]; then + if [[ $(date -v +${RENEW_ALERT}d +%s) -gt $(date -j -f "%b %d %H:%M:%S %Y %Z" "$ENDDATE" +%s) ]]; then PROBLEMS=$(echo "${PROBLEMS}- certificate near renewal date") fi else @@ -343,6 +345,7 @@ while IFS= read -r DOMAIN; do PROBLEMS=$(echo "${PROBLEMS}- certificate near renewal date") fi fi + set +x fi printf "%s|%s|%s|%s|%s\n" "$DOMAIN" "$ISSUEDTO" "$ENDDATE" "$ISSUER" "$PROBLEMS">> "$DATA_OUT" fi