mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-04-25 17:58:35 +02:00
change openssl to use enddate for expiry date check
This commit is contained in:
@@ -221,7 +221,7 @@ 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
|
||||
valid=$(openssl x509 -text -noout -in "certs/${domain}/cert.pem" | grep -i "not after" | cut -d: -f2- )
|
||||
valid=$(openssl x509 -enddate -noout -in "certs/${domain}/cert.pem" | cut -d= -f2- )
|
||||
echo " ${valid} Skipping. (Valid longer than ${RENEW_DAYS} days.)"
|
||||
continue
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user