From 9abf028503083f080fee91c9b54ded18105f4b11 Mon Sep 17 00:00:00 2001 From: Arjun Srivastava Date: Mon, 30 Aug 2021 16:40:14 +0530 Subject: [PATCH] Bug fixes for certbot-nginx config. (#87) - added missing $ for variable - removed ``"``` which lead to cert bot incorrrectly reading "-d example.com" as a whole as an argument, and throwing an error --- nginx-certbot/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx-certbot/entrypoint.sh b/nginx-certbot/entrypoint.sh index a090ba9..4f6665c 100644 --- a/nginx-certbot/entrypoint.sh +++ b/nginx-certbot/entrypoint.sh @@ -1,7 +1,7 @@ #!/bin/sh cert_path=/etc/letsencrypt/live/$(echo "$HOSTNAMES" | awk '{print $1}') -mkdir -p cert_path +mkdir -p $cert_path # if there is no certificate yet, get one email="--email $CERT_EMAIL" @@ -19,7 +19,7 @@ then echo "Getting new certificate..." /usr/bin/curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot-nginx/certbot_nginx/_internal/tls_configs/options-ssl-nginx.conf > /etc/letsencrypt/options-ssl-nginx.conf /usr/bin/curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot/certbot/ssl-dhparams.pem > /etc/letsencrypt/ssl-dhparams.pem - /usr/bin/certbot certonly --standalone "$names" --agree-tos "$email" + /usr/bin/certbot certonly --standalone $names --agree-tos "$email" fi nginx -g "daemon off;"