From c7d5a56c30f3b4d80b7638847def10020ecce8e8 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 21 Sep 2021 17:25:25 +0200 Subject: [PATCH] Update run.txt --- mealie/rootfs/run.txt | 40 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/mealie/rootfs/run.txt b/mealie/rootfs/run.txt index 2e42bf344..b75f3d100 100644 --- a/mealie/rootfs/run.txt +++ b/mealie/rootfs/run.txt @@ -39,39 +39,27 @@ if bashio::supervisor.ping; then '-----------------------------------------------------------' fi -################# -# NGINX SETTING # -################# +################ +# MODIFY IMAGE # +################ +#Sets caddyfile to 9925 as default port sed -i "s/80/9925/g" /app/Caddyfile +####### +# SSL # +####### + bashio::config.require.ssl if bashio::config.true 'ssl'; then bashio::log.info "Configuring ssl" CERTFILE=$(bashio::config 'certfile') KEYFILE=$(bashio::config 'keyfile') + + #Check if files exist + [ ! -f /ssl/$CERTFILE ] && bashio::log.fatal "Certificate /ssl/$CERTFILE not found" && exit 1 + [ ! -f /ssl/$KEYFILE ] && bashio::log.fatal "Certificate /ssl/$KEYFILE not found" && exit 1 + + #Modifies caddyfile for tls sed -i "7 i tls /ssl/$CERTFILE /ssl/$KEYFILE" /app/Caddyfile fi - -########### -# Ingress # -########### -# -#bashio::log.info "Configuring ingress" -# -#declare port -#declare certfile -#declare ingress_interface -#declare ingress_port -#declare keyfile -# -#port=$(bashio::addon.port 80) -#ingress_port=$(bashio::addon.ingress_port) -#ingress_interface=$(bashio::addon.ip_address) -#sed -i "s/%%port%%/${ingress_port}/g" /app/Caddyfile || true -#sed -i "s/%%interface%%/${ingress_interface}/g" /app/Caddyfile || true -# -#Correct image -#grep -rl '/css/' /app/dist/ | xargs sed -i 's|/css/|./css/|g' || true -#grep -rl '/js/' /app/dist/ | xargs sed -i 's|/js/|./js/|g' || true -#grep -rl '/api/' /app/dist/ | xargs sed -i 's|/api/|./api/|g' || true