]> git.street.me.uk Git - andy/dehydrated.git/commitdiff
fixed whitespace-stripping, replace all whitespace in domains.txt entries with single...
authorLukas Schauer <lukas@schauer.so>
Fri, 8 Jan 2016 22:03:06 +0000 (23:03 +0100)
committerLukas Schauer <lukas@schauer.so>
Fri, 8 Jan 2016 22:03:06 +0000 (23:03 +0100)
letsencrypt.sh

index 91ff2fc8a7c440f8ed2bd6dd53b5f006f4a2955c..0c086688f972f77d9fe74f233467fd5d4779f0a8 100755 (executable)
@@ -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"