This commit is contained in:
Alexandre
2026-03-19 09:54:19 +01:00
committed by GitHub
parent a9b89481cf
commit f64368c77b
7 changed files with 3 additions and 116 deletions

View File

@@ -1,26 +0,0 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
#################
# NGINX SETTING #
#################
declare ingress_interface
declare ingress_port
declare ingress_entry
echo "Adapting for ingress"
# Remove backend api url to use the base path
sed -i "s|'/server'|''|g" /app/back/app.conf
sed -i "s|gzip on|gzip off|g" /services/config/nginx/netalertx.conf.template
sed -i "s|(\$is_trusted != \"TRUSTED\")|(\$is_trusted = \"AAA\")|g" /services/config/nginx/netalertx.conf.template
# Adapt nginx configuration
ingress_port=$(bashio::addon.ingress_port)
ingress_interface=$(bashio::addon.ip_address)
ingress_entry=$(bashio::addon.ingress_entry)
sed -i "s|%%port%%|${ingress_port}|g" /etc/nginx/http.d/ingress.conf
sed -i "s|%%interface%%|${ingress_interface}|g" /etc/nginx/http.d/ingress.conf
sed -i "s|%%ingress_entry%%|${ingress_entry}|g" /etc/nginx/http.d/ingress.conf

View File

@@ -38,7 +38,6 @@ done
# Fix php
sed -i 's|>>"\?/tmp/log/app\.php_errors\.log"\? 2>/dev/stderr|>>"/tmp/log/app.php_errors.log"|g' /services/start-php-fpm.sh
sed -i 's|TEMP_CONFIG_FILE=$(mktemp "${TMP_DIR}/netalertx\.conf\.XXXXXX")|TEMP_CONFIG_FILE=$(mktemp -p "${TMP_DIR:-/tmp}" netalertx.conf.XXXXXX)|' /services/start-php-fpm.sh
sed -i "/default_type/a include /etc/nginx/http.d/ingress.conf;" "${SYSTEM_NGINX_CONFIG_TEMPLATE}"
#####################
# Configure network #