Exit nginx bypass placeholder cleanly on SIGTERM (#16845)

This commit is contained in:
J. Nick Koston
2026-06-05 17:58:50 -05:00
committed by GitHub
parent 70d9ab25f3
commit 8f8a70b2be

View File

@@ -6,11 +6,15 @@
# ============================================================================== # ==============================================================================
# The new device builder handles HA ingress itself, so nginx is bypassed. # The new device builder handles HA ingress itself, so nginx is bypassed.
# Block the longrun forever so s6 keeps the dependency satisfied and does # Block the longrun so s6 keeps the dependency satisfied, but exit 0 on
# not respawn it. # SIGTERM instead of being signal-killed; a 256/15 exit makes nginx/finish
# stamp the container exit 143, which trips the Supervisor's SIGTERM check.
if bashio::config.true 'use_new_device_builder'; then if bashio::config.true 'use_new_device_builder'; then
bashio::log.info "NGINX bypassed: new device builder serves ingress directly." bashio::log.info "NGINX bypassed: new device builder serves ingress directly."
exec sleep infinity trap 'exit 0' TERM
sleep infinity &
wait
exit 0
fi fi
bashio::log.info "Waiting for ESPHome dashboard to come up..." bashio::log.info "Waiting for ESPHome dashboard to come up..."