mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-04-24 09:18:28 +02:00
handle whitespace in domains.txt a bit different to be compatible with bsd sed, hopefully fixes #45
This commit is contained in:
@@ -407,7 +407,7 @@ command_sign_domains() {
|
|||||||
echo "${PARAM_DOMAIN}" > "${DOMAINS_TXT}"
|
echo "${PARAM_DOMAIN}" > "${DOMAINS_TXT}"
|
||||||
fi
|
fi
|
||||||
# Generate certificates for all domains found in domains.txt. Check if existing certificate are about to expire
|
# 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)"
|
domain="$(printf '%s\n' "${line}" | cut -d' ' -f1)"
|
||||||
morenames="$(printf '%s\n' "${line}" | cut -s -d' ' -f2-)"
|
morenames="$(printf '%s\n' "${line}" | cut -s -d' ' -f2-)"
|
||||||
cert="${BASEDIR}/certs/${domain}/cert.pem"
|
cert="${BASEDIR}/certs/${domain}/cert.pem"
|
||||||
|
|||||||
Reference in New Issue
Block a user