]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
handle whitespace in domains.txt a bit different to be compatible with bsd sed, hopef...
authorLukas Schauer <lukas@schauer.so>
Tue, 15 Dec 2015 23:50:42 +0000 (00:50 +0100)
committerLukas Schauer <lukas@schauer.so>
Tue, 15 Dec 2015 23:55:12 +0000 (00:55 +0100)
letsencrypt.sh

index 9bc25a3425915105f025fbd1e4cf21f60d769a84..a59f07308defdd7b8b2d83df07ffce4123b08ff2 100755 (executable)
@@ -407,7 +407,7 @@ command_sign_domains() {
     echo "${PARAM_DOMAIN}" > "${DOMAINS_TXT}"
   fi
   # Generate certificates for all domains found in domains.txt. Check if existing certificate are about to expire
-  <"${DOMAINS_TXT}" sed 's/^\s*//g;s/\s*$//g' | grep -v '^#' | grep -v '^$' | while read -r line; do
+  <"${DOMAINS_TXT}" sed 's/^[  ]*//g;s/[       ]*$//g' | grep -v '^#' | grep -v '^$' | 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"