mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-07-03 11:41:41 +02:00
show expire date when we don't need to renew a certifcate
This commit is contained in:
+2
-1
@@ -221,7 +221,8 @@ fi
|
|||||||
echo -n "Found existing cert for ${domain}. Expire date ..."
|
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
|
set +e; openssl x509 -checkend $((${RENEW_DAYS} * 86400)) -noout -in "certs/${domain}/cert.pem"; expiring=$?; set -e
|
||||||
if [[ ${expiring} -eq 0 ]]; then
|
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
|
continue
|
||||||
fi
|
fi
|
||||||
echo " is within ${RENEW_DAYS} days. Renewing..."
|
echo " is within ${RENEW_DAYS} days. Renewing..."
|
||||||
|
|||||||
Reference in New Issue
Block a user