Skip to content

Commit

Permalink
feat: disable location configuration by default
Browse files Browse the repository at this point in the history
  • Loading branch information
buchdag committed May 30, 2024
1 parent dba1f82 commit c66ceda
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions app/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,13 @@ if [[ "$*" == "/bin/bash /app/start.sh" ]]; then
exit 1
fi
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 '/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_dh_group
reload_nginx
Expand Down
6 changes: 4 additions & 2 deletions app/letsencrypt_service
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,10 @@ function update_cert {
for domain in "${hosts_array[@]}"; do
# Add all the domains to certificate
params_issue_arr+=(--domain "$domain")
# Add location configuration for the domain
add_location_configuration "$domain" || reload_nginx
# If enabled, add location configuration for the domain
if parse_true "${ACME_HTTP_CHALLENGE_LOCATION:=false}"; then
add_location_configuration "$domain" || reload_nginx
fi
done

params_issue_arr=("${params_base_arr[@]}" "${params_issue_arr[@]}")
Expand Down

0 comments on commit c66ceda

Please sign in to comment.