]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
do not change exit code of loop in command_sign_domains
authorLukas Schauer <lukas@schauer.so>
Fri, 8 Jan 2016 19:33:59 +0000 (20:33 +0100)
committerLukas Schauer <lukas@schauer.so>
Fri, 8 Jan 2016 19:33:59 +0000 (20:33 +0100)
letsencrypt.sh

index 07d8b1dbf24b36f0ed5756559f516db8cc9e338c..43ef21eca833572553c52f423452998b035cf30a 100755 (executable)
@@ -358,7 +358,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 '^(#|$)' | while read -r line; do
+  <"${DOMAINS_TXT}" sed 's/^[[:space:]]*//g;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"
@@ -409,7 +409,7 @@ command_sign_domains() {
 
     # shellcheck disable=SC2086
     sign_domain ${line}
-  done || true
+  done
 
   # remove temporary domains.txt file if used
   [[ -n "${PARAM_DOMAIN:-}" ]] && rm -f "${DOMAINS_TXT}"