From 8f8a70b2be9e10cd81053420c4bc7a04e3d92b4c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 5 Jun 2026 17:58:50 -0500 Subject: [PATCH] Exit nginx bypass placeholder cleanly on SIGTERM (#16845) --- .../ha-addon-rootfs/etc/s6-overlay/s6-rc.d/nginx/run | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docker/ha-addon-rootfs/etc/s6-overlay/s6-rc.d/nginx/run b/docker/ha-addon-rootfs/etc/s6-overlay/s6-rc.d/nginx/run index bb5f52e10c..b8251e8e01 100755 --- a/docker/ha-addon-rootfs/etc/s6-overlay/s6-rc.d/nginx/run +++ b/docker/ha-addon-rootfs/etc/s6-overlay/s6-rc.d/nginx/run @@ -6,11 +6,15 @@ # ============================================================================== # The new device builder handles HA ingress itself, so nginx is bypassed. -# Block the longrun forever so s6 keeps the dependency satisfied and does -# not respawn it. +# Block the longrun so s6 keeps the dependency satisfied, but exit 0 on +# 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 bashio::log.info "NGINX bypassed: new device builder serves ingress directly." - exec sleep infinity + trap 'exit 0' TERM + sleep infinity & + wait + exit 0 fi bashio::log.info "Waiting for ESPHome dashboard to come up..."