]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
show expire date when we don't need to renew a certifcate
authorMarkus Germeier <markus@germeier.com>
Sun, 6 Dec 2015 16:03:59 +0000 (17:03 +0100)
committerMarkus Germeier <markus@germeier.com>
Sun, 6 Dec 2015 16:03:59 +0000 (17:03 +0100)
letsencrypt.sh

index 2f6e0f202a8cf0a8cd8c8de999d18274a5121a7b..09710329f688747480385eb6d837144b6aa24f39 100755 (executable)
@@ -221,7 +221,8 @@ fi
     echo -n "Found existing cert for ${domain}. Expire date ..."
     set +e; openssl x509 -checkend $((${RENEW_DAYS} * 86400)) -noout -in "certs/${domain}/cert.pem"; expiring=$?; set -e
     if [[ ${expiring} -eq 0 ]]; then
-        echo " is not within ${RENEW_DAYS} days. Skipping"
+       valid=$(openssl x509 -text -noout -in "certs/${domain}/cert.pem" | grep -i "not after"  | cut -d: -f2- )
+       echo "${valid} Skipping. (Valid longer than ${RENEW_DAYS} days.)"
         continue
     fi
     echo " is within ${RENEW_DAYS} days. Renewing..."