addon-thelounge/thelounge/rootfs/etc/cont-init.d/nginx.sh
Franck Nijhof 5c09fe1ab3
⬆️ Upgrades add-on base image to 12.0.0 (#113)
* ⬆️ Upgrades add-on base image to 12.0.0

* Update debs
2022-06-09 10:22:47 +02:00

17 lines
712 B
Bash
Executable file

#!/command/with-contenv bashio
# ==============================================================================
# Home Assistant Community Add-on: The Lounge
# Configures NGINX for use with thelounge
# ==============================================================================
# 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')" \
ssl "^$(bashio::config 'ssl')" \
| tempio \
-template /etc/nginx/templates/direct.gtpl \
-out /etc/nginx/servers/direct.conf
fi