1
0

feat: disable location configuration by default

This commit is contained in:
Nicolas Duchon 2024-05-30 22:30:21 +02:00
parent dba1f82ee4
commit c66cedaf97
No known key found for this signature in database
GPG Key ID: EA3151C66A4D79E7
2 changed files with 9 additions and 4 deletions

@ -167,10 +167,13 @@ if [[ "$*" == "/bin/bash /app/start.sh" ]]; then
exit 1 exit 1
fi fi
check_writable_directory '/etc/nginx/certs' check_writable_directory '/etc/nginx/certs'
check_writable_directory '/etc/nginx/vhost.d' parse_true "${ACME_HTTP_CHALLENGE_LOCATION:=false}" && check_writable_directory '/etc/nginx/vhost.d'
check_writable_directory '/etc/acme.sh' check_writable_directory '/etc/acme.sh'
check_writable_directory '/usr/share/nginx/html' check_writable_directory '/usr/share/nginx/html'
[[ -f /app/letsencrypt_user_data ]] && check_writable_directory '/etc/nginx/conf.d' if [[ -f /app/letsencrypt_user_data ]]; then
check_writable_directory '/etc/nginx/vhost.d'
check_writable_directory '/etc/nginx/conf.d'
fi
check_default_cert_key check_default_cert_key
check_dh_group check_dh_group
reload_nginx reload_nginx

@ -348,8 +348,10 @@ function update_cert {
for domain in "${hosts_array[@]}"; do for domain in "${hosts_array[@]}"; do
# Add all the domains to certificate # Add all the domains to certificate
params_issue_arr+=(--domain "$domain") params_issue_arr+=(--domain "$domain")
# Add location configuration for the domain # If enabled, add location configuration for the domain
if parse_true "${ACME_HTTP_CHALLENGE_LOCATION:=false}"; then
add_location_configuration "$domain" || reload_nginx add_location_configuration "$domain" || reload_nginx
fi
done done
params_issue_arr=("${params_base_arr[@]}" "${params_issue_arr[@]}") params_issue_arr=("${params_base_arr[@]}" "${params_issue_arr[@]}")