From 55395e1ef40e8761f2b6ca59384bd68686c6fb3b Mon Sep 17 00:00:00 2001 From: "Mehdi (OSX)" Date: Wed, 22 Nov 2023 15:27:35 +0500 Subject: [PATCH] First commit. --- generate-certs.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/generate-certs.sh b/generate-certs.sh index f1fe307..f3d0da8 100755 --- a/generate-certs.sh +++ b/generate-certs.sh @@ -5,9 +5,11 @@ dry_run=true cloudflare_token='' #Create it from Cloudflare, and limit it the DNZ zone of your domain. -live_certs_dir="certs/live/calm.biz"; #Script will check this directory for empty, to determine to create or renew ssl certificates. +live_certs_dir="certs/live/test.com"; #Script will check this directory for empty, to determine to create or renew ssl certificates. -new_ssl_command="docker run --rm -v ./certs:/etc/letsencrypt -v #cloudflare_token_file#:/certbot-cloudflare certbot/dns-cloudflare certonly #dry_run_arg# --dns-cloudflare --dns-cloudflare-credentials /certbot-cloudflare -d calm.biz -d \*.calm.biz -d temp.temp.calm.biz --preferred-challenges dns-01 --preferred-chain 'ISRG Root X1' --non-interactive --dns-cloudflare-propagation-seconds 20 --agree-tos --email w3goodies.com@gmail.com"; +#-d test.com, -d *.test.com means certificate for: test.com and it's wildcard subdomains. +#Only 1 certificate will be generated, regardless of number of subdomains provided here. +new_ssl_command="docker run --rm -v ./certs:/etc/letsencrypt -v #cloudflare_token_file#:/certbot-cloudflare certbot/dns-cloudflare certonly #dry_run_arg# --dns-cloudflare --dns-cloudflare-credentials /certbot-cloudflare -d test.com -d \*.test.com --preferred-challenges dns-01 --preferred-chain 'ISRG Root X1' --non-interactive --dns-cloudflare-propagation-seconds 20 --agree-tos --email w3goodies.com@gmail.com"; renew_command="docker run --rm -v ./certs:/etc/letsencrypt -v #cloudflare_token_file#:/certbot-cloudflare certbot/dns-cloudflare renew #dry_run_arg# --non-interactive --agree-tos --email w3goodies.com@gmail.com --no-random-sleep-on-renew" post_hook="docker-compose restart nginx" #posthook is executed if certificate is created for first time, or if "${live_certs_dir}/cert.pem" file is modified (based on checking last modified time).