mirror of
https://github.com/hassio-addons/addon-tasmoadmin.git
synced 2025-05-05 03:21:34 +00:00
20 lines
676 B
Bash
Executable file
20 lines
676 B
Bash
Executable file
#!/command/with-contenv bashio
|
|
# ==============================================================================
|
|
# Home Assistant Community Add-on: TasmoAdmin
|
|
# Configures NGINX for use with TasmoAdmin
|
|
# ==============================================================================
|
|
declare certfile
|
|
declare keyfile
|
|
|
|
bashio::config.require.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
|