From 5cebe63739159e7de51a1a77331f1855b8c915d2 Mon Sep 17 00:00:00 2001 From: "Mehdi (OSX)" Date: Thu, 23 Nov 2023 12:44:35 +0500 Subject: [PATCH] New Updates --- README.md | 2 +- config-example.sh | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1158413..feec93f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## Usage: chmod +x certbot-docker-script/generate-certs.sh ``` 3. Create `certs` folder inside `ssl` folder. -4. Put `config.sh` inside `ssl` folder. +4. Create `config.sh` inside `ssl` folder. - Copy contents from [config-example.sh](https://git.w3goodies.com/mehdi-mac/certbot-docker-script/src/branch/main/config-example.sh) - Modify it to your needs. 5. The folder structure would be: diff --git a/config-example.sh b/config-example.sh index 1d23a01..d616874 100644 --- a/config-example.sh +++ b/config-example.sh @@ -6,20 +6,25 @@ dry_run=true cloudflare_token='' #Set location for certificates to store in. +#It's relative to certbot-docker-script folder. +#Leave it default if you're following instructions from README.md certs_dir="../certs/" #Script will create certificate for domain.com and as well as *.domain.com (wildcard) domain="test.com" -#Email to receive expiration notices or other mails from certbot +#Email to receive expiration notices or other mails from certbot. email="w3goodies.com@gmail.com" -#Generate certificates using this command. +#New certificates are created using this command. #Script will generate certificate for domain.com and as well as *.domain.com (wildcard) new_ssl_command="docker run --rm -v #certs_dir#:/etc/letsencrypt -v #cloudflare_token_file#:/certbot-cloudflare certbot/dns-cloudflare certonly #dry_run_arg# #domain_arg# --dns-cloudflare --dns-cloudflare-credentials /certbot-cloudflare --preferred-challenges dns-01 --preferred-chain 'ISRG Root X1' --non-interactive --dns-cloudflare-propagation-seconds 20 --agree-tos #email_arg#"; -#domains cant be changed in renewal. If you want to change, then clear certs/* folder and regenerate certificates. +#If the certificate already exist, then renewal command is used to renew certificates. +#Domains cant be changed in renewal. If you want to change, then clear certs/* folder and regenerate certificates. renew_command="docker run --rm -v #certs_dir#:/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" -#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). +#posthook is only executed: +# if certificate is created for first time, +# or if certificate (live/yourdomain.com/cert.pem) file is modified (based on checking last modified time). post_hook="echo 'dummy post hook result'" \ No newline at end of file