mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fetch all cert-status at once because running a yunohost command takes ~3ish seconds per call
This commit is contained in:
parent
54cc684a35
commit
cf32853f81
1 changed files with 3 additions and 1 deletions
|
@ -52,6 +52,8 @@ do_pre_regen() {
|
||||||
export compatibility="$(yunohost settings get 'security.nginx.compatibility')"
|
export compatibility="$(yunohost settings get 'security.nginx.compatibility')"
|
||||||
ynh_render_template "security.conf.inc" "${nginx_conf_dir}/security.conf.inc"
|
ynh_render_template "security.conf.inc" "${nginx_conf_dir}/security.conf.inc"
|
||||||
|
|
||||||
|
cert_status=$(yunohost domain cert-status --json)
|
||||||
|
|
||||||
# add domain conf files
|
# add domain conf files
|
||||||
for domain in $domain_list; do
|
for domain in $domain_list; do
|
||||||
domain_conf_dir="${nginx_conf_dir}/${domain}.d"
|
domain_conf_dir="${nginx_conf_dir}/${domain}.d"
|
||||||
|
@ -61,7 +63,7 @@ do_pre_regen() {
|
||||||
|
|
||||||
# NGINX server configuration
|
# NGINX server configuration
|
||||||
export domain
|
export domain
|
||||||
export domain_cert_ca=$(yunohost domain cert-status $domain --json \
|
export domain_cert_ca=$(echo $cert_status \
|
||||||
| jq ".certificates.\"$domain\".CA_type" \
|
| jq ".certificates.\"$domain\".CA_type" \
|
||||||
| tr -d '"')
|
| tr -d '"')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue