From b5d92f80b9147b10bc130ba085feb1b0e5cbf9c4 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Wed, 8 Aug 2018 14:11:03 +0200 Subject: [PATCH] Correct domains.conf parsing with wildcard domains in the last line of the file. --- README.md | 2 +- VERSION | 2 +- files/watch-domains.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6e8450c0..d5f30408 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ #  ![](https://raw.githubusercontent.com/adferrand/docker-letsencrypt-dns/master/images/logo_from_realies_200px.png) adferrand/letsencrypt-dns -![](https://img.shields.io/badge/tags-latest-lightgrey.svg) [![](https://images.microbadger.com/badges/version/adferrand/letsencrypt-dns:2.5.0.svg) ![](https://images.microbadger.com/badges/image/adferrand/letsencrypt-dns:2.5.0.svg)](https://microbadger.com/images/adferrand/letsencrypt-dns:2.5.0) +![](https://img.shields.io/badge/tags-latest-lightgrey.svg) [![](https://images.microbadger.com/badges/version/adferrand/letsencrypt-dns:2.5.1.svg) ![](https://images.microbadger.com/badges/image/adferrand/letsencrypt-dns:2.5.1.svg)](https://microbadger.com/images/adferrand/letsencrypt-dns:2.5.1) * [Container functionalities](#container-functionalities) * [Why use this Docker](#why-use-this-docker-) diff --git a/VERSION b/VERSION index 437459cd..73462a5a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.5.0 +2.5.1 diff --git a/files/watch-domains.sh b/files/watch-domains.sh index 7655bf16..f7343332 100755 --- a/files/watch-domains.sh +++ b/files/watch-domains.sh @@ -28,7 +28,7 @@ while true; do certbot register -n --agree-tos -m $LETSENCRYPT_USER_MAIL $server_cmd echo "#### Creating missing certificates if needed (~1min for each) ####" - while entry=; IFS=$'\n\r' read -r entry || [[ $entry ]]; do + while read -r entry || [ -n "$entry" ]; do autorestart_config=`echo $entry | grep -E -o 'autorestart-containers=.*' | sed 's/autocmd-containers=.*//' | sed 's/autorestart-containers=//' | xargs` autocmd_config=`echo $entry | grep -E -o 'autocmd-containers=.*' | sed 's/autorestart-containers=.*//' | sed 's/autocmd-containers=//' | xargs` clean_domains=`echo $entry | sed 's/autorestart-containers=.*//' | sed 's/autocmd-containers=.*//' | xargs` @@ -77,7 +77,7 @@ while true; do echo "### Revoke and delete certificates if needed ####" for domain in `ls /etc/letsencrypt/live`; do remove_domain=true - while entry=; IFS=$'\n\r' read -r entry || [[ $entry ]]; do + while read -r entry || [ -n "$entry" ]; do for comp_domain in $entry; do if [ "$domain" = "${comp_domain/\*\./}" ]; then remove_domain=false