mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-25 02:01:52 +02:00
Use embedded nginx https://github.com/alexbelgium/hassio-addons/issues/2567
This commit is contained in:
@@ -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
|
||||
@@ -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 #
|
||||
|
||||
Reference in New Issue
Block a user