From 20a8169a2d7c7fb0459db3e2fa45ad9aa15b2fba Mon Sep 17 00:00:00 2001 From: Lukas Schauer Date: Fri, 8 Jan 2016 23:03:06 +0100 Subject: [PATCH] fixed whitespace-stripping, replace all whitespace in domains.txt entries with single space character (fixes #60 and #78) --- letsencrypt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/letsencrypt.sh b/letsencrypt.sh index 91ff2fc..0c08668 100755 --- a/letsencrypt.sh +++ b/letsencrypt.sh @@ -377,7 +377,7 @@ command_sign_domains() { fi # Generate certificates for all domains found in domains.txt. Check if existing certificate are about to expire - <"${DOMAINS_TXT}" sed 's/^[[:space:]]*//g;s/[[:space:]]*$//g' | (grep -vE '^(#|$)' || true) | while read -r line; do + <"${DOMAINS_TXT}" sed -E -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' -e 's/[[:space:]]+/ /g' | (grep -vE '^(#|$)' || true) | while read -r line; do domain="$(printf '%s\n' "${line}" | cut -d' ' -f1)" morenames="$(printf '%s\n' "${line}" | cut -s -d' ' -f2-)" cert="${BASEDIR}/certs/${domain}/cert.pem" -- 2.47.2