acme: Handle ecc cert correctly
Error was: The domain 'example.com' seems to have a ECC cert already, please add '--ecc' parameter if you want to use that cert. Signed-off-by: David Yang <mmyangfl@gmail.com>
This commit is contained in:
parent
6a4c1b2051
commit
0d2240481b
|
@ -183,6 +183,7 @@ issue_cert()
|
||||||
local update_uhttpd
|
local update_uhttpd
|
||||||
local update_nginx
|
local update_nginx
|
||||||
local keylength
|
local keylength
|
||||||
|
local keylength_ecc=0
|
||||||
local domains
|
local domains
|
||||||
local main_domain
|
local main_domain
|
||||||
local moved_staging=0
|
local moved_staging=0
|
||||||
|
@ -215,6 +216,7 @@ issue_cert()
|
||||||
|
|
||||||
if echo $keylength | grep -q "^ec-"; then
|
if echo $keylength | grep -q "^ec-"; then
|
||||||
domain_dir="$STATE_DIR/${main_domain}_ecc"
|
domain_dir="$STATE_DIR/${main_domain}_ecc"
|
||||||
|
keylength_ecc=1
|
||||||
else
|
else
|
||||||
domain_dir="$STATE_DIR/${main_domain}"
|
domain_dir="$STATE_DIR/${main_domain}"
|
||||||
fi
|
fi
|
||||||
|
@ -234,6 +236,7 @@ issue_cert()
|
||||||
moved_staging=1
|
moved_staging=1
|
||||||
else
|
else
|
||||||
log "Found previous cert config. Issuing renew."
|
log "Found previous cert config. Issuing renew."
|
||||||
|
[ "$keylength_ecc" -eq "1" ] && acme_args="$acme_args --ecc"
|
||||||
run_acme --home "$STATE_DIR" --renew -d "$main_domain" $acme_args && ret=0 || ret=1
|
run_acme --home "$STATE_DIR" --renew -d "$main_domain" $acme_args && ret=0 || ret=1
|
||||||
post_checks
|
post_checks
|
||||||
return $ret
|
return $ret
|
||||||
|
|
Loading…
Reference in New Issue