mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 18:31:02 +01:00
Update
This commit is contained in:
@@ -2,11 +2,19 @@
|
||||
# shellcheck shell=bash
|
||||
|
||||
if bashio::config.true 'ssl'; then
|
||||
|
||||
# Adapt nginx template
|
||||
certfile=$(bashio::config 'certfile')
|
||||
keyfile=$(bashio::config 'keyfile')
|
||||
sed -i "s#%%certfile%%#${certfile}#g" /etc/nginx/servers/direct.conf
|
||||
sed -i "s#%%keyfile%%#${keyfile}#g" /etc/nginx/servers/direct.conf
|
||||
|
||||
# Check if files exist
|
||||
echo "... checking if referenced certificates exist"
|
||||
[ ! -f /ssl/"$certfile" ] && bashio::log.fatal "... use_own_certs is true but certificate /ssl/$certfile not found" && bashio::exit.nok
|
||||
[ ! -f /ssl/"$keyfile" ] && bashio::log.fatal "... use_own_certs is true but certificate /ssl/$keyfile not found" && bashio::exit.nok
|
||||
|
||||
# Configure URL
|
||||
if bashio::config.has_value "PAPERLESS_URL"; then
|
||||
bashio::log.warning "Ssl enabled, your site will be available at $(bashio::config "PAPERLESS_URL"):$(bashio::addon.port 8443). Don't forget to enable the https alternative port in the addon options."
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user