mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-28 19:34:05 +02:00
ingress_test
This commit is contained in:
18
transmission/rootfs/etc/cont-init.d/32-nginx_ingress.sh
Normal file
18
transmission/rootfs/etc/cont-init.d/32-nginx_ingress.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
#################
|
||||
# NGINX SETTING #
|
||||
#################
|
||||
declare ingress_interface
|
||||
declare ingress_port
|
||||
|
||||
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/servers/ingress.conf
|
||||
sed -i "s/%%interface%%/${ingress_interface}/g" /etc/nginx/servers/ingress.conf
|
||||
sed -i "s|%%ingress_entry%%|${ingress_entry}|g" /etc/nginx/servers/ingress.conf
|
||||
|
||||
# Avoid error message
|
||||
grep -rnl "PhotoPrism has been updated…" /opt/photoprism | xargs sed -i "s|PhotoPrism has been updated…|Please click cancel|g"
|
||||
Reference in New Issue
Block a user