mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 13:27:14 +00:00
Exit nginx bypass placeholder cleanly on SIGTERM (#16845)
This commit is contained in:
@@ -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..."
|
||||||
|
|||||||
Reference in New Issue
Block a user