Commit 9d787f38 authored by Lukas Schauer's avatar Lukas Schauer

handle whitespace in domains.txt a bit different to be compatible with bsd sed, hopefully fixes #45

parent a2e57b1e
......@@ -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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment