mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 13:45:15 +00:00
24 lines
782 B
Plaintext
Executable File
24 lines
782 B
Plaintext
Executable File
#!/command/with-contenv bashio
|
|
# shellcheck shell=bash
|
|
# ==============================================================================
|
|
# Community Hass.io Add-ons: ESPHome
|
|
# Runs the NGINX proxy
|
|
# ==============================================================================
|
|
|
|
# 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.
|
|
if bashio::config.true 'use_new_device_builder'; then
|
|
bashio::log.info "NGINX bypassed: new device builder serves ingress directly."
|
|
exec sleep infinity
|
|
fi
|
|
|
|
bashio::log.info "Waiting for ESPHome dashboard to come up..."
|
|
|
|
while [[ ! -S /var/run/esphome.sock ]]; do
|
|
sleep 0.5
|
|
done
|
|
|
|
bashio::log.info "Starting NGINX..."
|
|
exec nginx
|