From f7c20f2c1446fba412c91acc1621601cf08b41cc Mon Sep 17 00:00:00 2001 From: Olivier Leger Date: Thu, 17 Aug 2023 16:27:34 -0400 Subject: [PATCH] WIP 2 --- templates/nginx-certbot/init-letsencrypt.sh.tpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/nginx-certbot/init-letsencrypt.sh.tpl b/templates/nginx-certbot/init-letsencrypt.sh.tpl index d71f83a..6d62727 100644 --- a/templates/nginx-certbot/init-letsencrypt.sh.tpl +++ b/templates/nginx-certbot/init-letsencrypt.sh.tpl @@ -9,7 +9,7 @@ DATA_PATH="./data/certbot" EMAIL="" # Adding a valid address is strongly recommended STAGING=0 # Set to 1 if you're testing your setup to avoid hitting request limits MKDIR_CMD=$$(which mkdir) -DOCKER_COMPOSE_CMD="$$(which ${DOCKER_COMPOSE_CMD})${DOCKER_COMPOSE_SUFFIX}" +DOCKER_COMPOSE_CMD="$$(which ${DOCKER_COMPOSE_CMD})" CURL_CMD=$$(which curl) @@ -31,7 +31,7 @@ fi echo "### Creating dummy certificate for $${DOMAINS_CSV} ..." DOMAINS_PATH="/etc/letsencrypt/live/$$DOMAINS" $$MKDIR_CMD -p "$$DATA_PATH/conf/live/$$DOMAINS" -$$DOCKER_COMPOSE_CMD run --rm --entrypoint "\ +$$DOCKER_COMPOSE_CMD ${DOCKER_COMPOSE_SUFFIX} run --rm --entrypoint "\ openssl req -x509 -nodes -newkey rsa:1024 -days 1\ -keyout '$$DOMAINS_PATH/privkey.pem' \ -out '$$DOMAINS_PATH/fullchain.pem' \ @@ -40,11 +40,11 @@ echo echo "### Starting nginx ..." -$$DOCKER_COMPOSE_CMD up --force-recreate -d nginx_ssl_proxy +$$DOCKER_COMPOSE_CMD ${DOCKER_COMPOSE_SUFFIX} up --force-recreate -d nginx_ssl_proxy echo echo "### Deleting dummy certificate for $${DOMAINS_CSV} ..." -$$DOCKER_COMPOSE_CMD run --rm --entrypoint "\ +$$DOCKER_COMPOSE_CMD ${DOCKER_COMPOSE_SUFFIX} run --rm --entrypoint "\ rm -Rf /etc/letsencrypt/live/$$DOMAINS && \ rm -Rf /etc/letsencrypt/archive/$$DOMAINS && \ rm -Rf /etc/letsencrypt/renewal/$$DOMAINS.conf" certbot @@ -67,7 +67,7 @@ esac # Enable staging mode if needed if [ $$STAGING != "0" ]; then STAGING_ARG="--staging"; fi -$$DOCKER_COMPOSE_CMD run --rm --entrypoint "\ +$$DOCKER_COMPOSE_CMD ${DOCKER_COMPOSE_SUFFIX} run --rm --entrypoint "\ certbot certonly --webroot -w /var/www/certbot \ $$STAGING_ARG \ $$EMAIL_ARG \