mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
Create 31-ingress.conf
This commit is contained in:
18
omni-tools/rootfs/etc/cont-init.d/31-ingress.conf
Normal file
18
omni-tools/rootfs/etc/cont-init.d/31-ingress.conf
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
set -e
|
||||
|
||||
#################
|
||||
# NGINX SETTING #
|
||||
#################
|
||||
|
||||
declare ingress_interface
|
||||
declare ingress_port
|
||||
|
||||
mv "/ingress.conf" "/etc/nginx/conf.d"
|
||||
|
||||
echo "Adapting for ingress"
|
||||
ingress_port=$(bashio::addon.ingress_port)
|
||||
ingress_interface=$(bashio::addon.ip_address)
|
||||
sed -i "s/%%port%%/${ingress_port}/g" "/etc/nginx/conf.d/ingress.conf"
|
||||
sed -i "s/%%interface%%/${ingress_interface}/g" "/etc/nginx/conf.d/ingress.conf"
|
||||
Reference in New Issue
Block a user