From 092f47b5676c61ba55b1e6d239d4e6552e7c975f Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Wed, 28 Nov 2018 20:35:59 +0400 Subject: [PATCH] Some changes --- certbot.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/certbot.sh b/certbot.sh index 1e829ce..57e6a51 100644 --- a/certbot.sh +++ b/certbot.sh @@ -28,8 +28,6 @@ fi for domain in "${domains[@]}"; do if [ -d "$data_path/conf/live/$domain" ]; then - path="/etc/letsencrypt/live/$domain" - read -p "There is already folder with $domain domain data, do you want to remove it? (WARNING: removing folder will remove all certbot data for this domain) (Y/n) " decision case $decision in [Y]* ) rm -rf "$data_path/conf/live/$domain" && mkdir -p "$data_path/conf/live/$domain";; @@ -42,10 +40,6 @@ for domain in "${domains[@]}"; do done -echo "### Starting nginx ..." -docker-compose up -d nginx - - # Select appropriate email arg case "$email" in "") email_arg="--register-unsafely-without-email" ;; @@ -63,6 +57,9 @@ for domain in "${domains[@]}"; do docker-compose run --rm --entrypoint "openssl req -x509 -nodes -newkey rsa:4096 \ -days 10 -keyout '$path/privkey.pem' -out '$path/fullchain.pem' -subj '/CN=localhost'" certbot + echo "### Starting nginx ..." + docker-compose up -d nginx + echo "### Deleting dummy certificate for $domain domain ..." rm -rf "$data_path/conf/live/$domain"