mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 12:54:04 +02:00
allow access to restricted area in ingress
This commit is contained in:
@@ -18,6 +18,10 @@ ingress_entry=$(bashio::addon.ingress_entry)
|
|||||||
# Quits if ingress not active
|
# Quits if ingress not active
|
||||||
if [ -z "$ingress_entry" ]; then exit 0; fi
|
if [ -z "$ingress_entry" ]; then exit 0; fi
|
||||||
|
|
||||||
|
# Create .htpasswd
|
||||||
|
export "$(grep "^CADDY_PWD" /config/birdnet.conf)"
|
||||||
|
htpasswd -b -c /home/pi/.htpasswd birdnet "$CADDY_PWD" &>/dev/null
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
bashio::log.info "Adapting for ingress"
|
bashio::log.info "Adapting for ingress"
|
||||||
sed -i "s/%%port%%/${ingress_port}/g" /etc/nginx/servers/ingress.conf
|
sed -i "s/%%port%%/${ingress_port}/g" /etc/nginx/servers/ingress.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user