acme: fix staging option

Legacy use_staging option was not respected, and the example config
still use the legacy name.

Signed-off-by: Glen Huang <i@glenhuang.com>
This commit is contained in:
Glen Huang 2022-10-24 10:21:45 +08:00
parent 7f04710579
commit 9d2d8787ca
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@ config acme
config cert 'example_wildcard'
option enabled 0
option use_staging 1
option staging 1
list domains example.org
list domains sub.example.org
list domains *.sub.example.org
@ -17,6 +17,6 @@ config cert 'example_wildcard'
config cert 'example'
option enabled 0
option use_staging 1
option staging 1
list domains example.org
list domains sub.example.org

View file

@ -36,7 +36,7 @@ load_options() {
section=$1
# compatibility for old option name
config_get_bool use_staging "$section" staging
config_get_bool staging "$section" use_staging
if [ -z "$staging" ]; then
config_get_bool staging "$section" staging 0
fi