We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 71f6b77 + 724a658 commit 5ca7fb5Copy full SHA for 5ca7fb5
1 file changed
app/nginx/scripts/get-certs.sh
@@ -29,6 +29,13 @@ for LINE in $(cat /scripts/domains); do
29
flags="$flags --challenge-alias $ALIAS_DOMAIN"
30
fi
31
32
+ # skip if we already have a cert that's valid for more than 3 days; cron will handle renewals
33
+ CERT_FILE=/certs/live/$folder/fullchain.pem
34
+ if [[ -f $CERT_FILE ]] && openssl x509 -checkend $((3*86400)) -noout -in "$CERT_FILE" >/dev/null 2>&1; then
35
+ echo "Skipping $DOMAIN: existing cert valid for >3 days"
36
+ continue
37
+ fi
38
+
39
mkdir -p /certs/live/$folder
40
41
/scripts/acme.sh/acme.sh --home /certs --issue --dns dns_aws $flags \
0 commit comments