Commit 5d24285f authored by Lukas Schauer's avatar Lukas Schauer

Merge pull request #13 from germeier/master

show expire date when we don't need to renew a certifcate
parents ae8e5c8e 9f93ef5e
......@@ -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 -enddate -noout -in "certs/${domain}/cert.pem" | cut -d= -f2- )
echo " ${valid} Skipping. (Valid longer than ${RENEW_DAYS} days.)"
continue
fi
echo " is within ${RENEW_DAYS} days. Renewing..."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment