diff --git a/home-panel/rootfs/etc/cont-init.d/20-nginx.sh b/home-panel/rootfs/etc/cont-init.d/20-nginx.sh index c1e0396..53c1c55 100644 --- a/home-panel/rootfs/etc/cont-init.d/20-nginx.sh +++ b/home-panel/rootfs/etc/cont-init.d/20-nginx.sh @@ -9,7 +9,7 @@ source /usr/lib/hassio-addons/base.sh certfile="/ssl/$(hass.config.get 'certfile')" keyfile="/ssl/$(hass.config.get 'keyfile')" -if [ -f "$certfile" ]; then +if [ "$(hass.config.get 'ssl')" ]; then hass.log.info "Copy enabled SSL nginx config" echo "server { listen 8234 ssl http2 default_server; diff --git a/home-panel/rootfs/etc/cont-init.d/30-api.sh b/home-panel/rootfs/etc/cont-init.d/30-api.sh index e84952a..7d85188 100644 --- a/home-panel/rootfs/etc/cont-init.d/30-api.sh +++ b/home-panel/rootfs/etc/cont-init.d/30-api.sh @@ -11,7 +11,7 @@ echo "REACT_APP_API_URL = $(hass.config.get 'api_url')" > /usr/src/app/.env.loca certfile="/ssl/$(hass.config.get 'certfile')" keyfile="/ssl/$(hass.config.get 'keyfile')" -if [ -f "$certfile" ]; then +if [ "$(hass.config.get 'ssl')" ]; then hass.log.info "Copy SSL certs to api directory" cp "$certfile" /usr/src/api/fullchain.pem cp "$keyfile" /usr/src/api/privkey.pem