Browse Source

fix: [letsencrypt] wildcard domains would fail to be created

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
matomo
Valentin Lab 4 years ago
parent
commit
a48ca4c6b3
  1. 1
      letsencrypt/lib/common

1
letsencrypt/lib/common

@ -78,6 +78,7 @@ letsencrypt_get_challenge_type() {
letsencrypt_set_renew_before_expiry() {
local domain="$1" days="$2" renewal_file
domain="${domain#\*.}" ## remove '*.' from wildcard domain
renewal_file="$SERVICE_DATASTORE"/etc/letsencrypt/renewal/"$domain".conf
[ -e "$renewal_file" ] || return 1
sed -ri "s/^(#\s+)?(renew_before_expiry\s*=)\s*[0-9]+(\s+days)$/\2 $days\3/g" "$renewal_file"

Loading…
Cancel
Save