mirror of
https://github.com/hassio-addons/addon-glances.git
synced 2025-05-05 03:21:36 +00:00
* ⬆️ Upgrades add-on base image to 12.0.0
* Shellcheck actually caught a bug! :D
* Init true is the default
27 lines
1.1 KiB
Bash
Executable file
27 lines
1.1 KiB
Bash
Executable file
#!/usr/bin/env bashio
|
|
# ==============================================================================
|
|
# Home Assistant Community Add-on: SSH & Web Terminal
|
|
# Configures NGINX for use with ttyd
|
|
# ==============================================================================
|
|
|
|
# Generate Ingress configuration
|
|
bashio::var.json \
|
|
interface "$(bashio::addon.ip_address)" \
|
|
port "^$(bashio::addon.ingress_port)" \
|
|
| tempio \
|
|
-template /etc/nginx/templates/ingress.gtpl \
|
|
-out /etc/nginx/servers/ingress.conf
|
|
|
|
# Generate direct access configuration, if enabled.
|
|
if bashio::var.has_value "$(bashio::addon.port 80)"; then
|
|
bashio::config.require.ssl
|
|
bashio::var.json \
|
|
certfile "$(bashio::config 'certfile')" \
|
|
keyfile "$(bashio::config 'keyfile')" \
|
|
leave_front_door_open "^$(bashio::config 'leave_front_door_open')" \
|
|
port "^$(bashio::addon.port 80)" \
|
|
ssl "^$(bashio::config 'ssl')" \
|
|
| tempio \
|
|
-template /etc/nginx/templates/direct.gtpl \
|
|
-out /etc/nginx/servers/direct.conf
|
|
fi
|