mirror of
https://github.com/esphome/esphome.git
synced 2024-11-14 02:58:11 +01:00
7ad2d86929
* Update Hassio base image to 1.4.1 * Fix rotary encoder typo Fixes https://github.com/esphome/issues/issues/136
26 lines
771 B
Bash
Executable file
26 lines
771 B
Bash
Executable file
#!/usr/bin/with-contenv bashio
|
|
# ==============================================================================
|
|
# Community Hass.io Add-ons: ESPHome
|
|
# Configures NGINX for use with ESPHome
|
|
# ==============================================================================
|
|
|
|
declare certfile
|
|
declare keyfile
|
|
declare port
|
|
|
|
mkdir -p /var/log/nginx
|
|
|
|
# Enable SSL
|
|
if bashio::config.true 'ssl'; then
|
|
rm /etc/nginx/nginx.conf
|
|
mv /etc/nginx/nginx-ssl.conf /etc/nginx/nginx.conf
|
|
|
|
certfile=$(bashio::config 'certfile')
|
|
keyfile=$(bashio::config 'keyfile')
|
|
|
|
sed -i "s/%%certfile%%/${certfile}/g" /etc/nginx/nginx.conf
|
|
sed -i "s/%%keyfile%%/${keyfile}/g" /etc/nginx/nginx.conf
|
|
fi
|
|
|
|
port=$(bashio::config 'port')
|
|
sed -i "s/%%port%%/${port}/g" /etc/nginx/nginx.conf
|