mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-18 10:28:17 +01:00
21 lines
664 B
Bash
Executable File
21 lines
664 B
Bash
Executable File
#!/usr/bin/with-contenv bashio
|
|
# shellcheck shell=bash
|
|
# shellcheck disable=SC2046
|
|
|
|
#################
|
|
# NGINX SETTING #
|
|
#################
|
|
|
|
cp /defaults/default.conf /etc/nginx/http.d/ingress.conf
|
|
|
|
ingress_port=$(bashio::addon.ingress_port)
|
|
#ingress_interface=$(bashio::addon.ip_address)
|
|
sed -i "s/3001/0001/g" /etc/nginx/http.d/ingress.conf
|
|
sed -i "s/3000/${ingress_port}/g" /etc/nginx/http.d/ingress.conf
|
|
#sed -i "s/%%interface%%/${ingress_interface}/g" /etc/nginx/sites-available/ingress.conf
|
|
|
|
nginx -s reload &>/dev/null || true
|
|
|
|
# Implement SUBFOLDER value
|
|
sed -i "1a SUBFOLDER=$(bashio::addon.ingress_url)" $(find /etc/s6-overlay/s6-rc.d -name "run" -type f)
|