mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-12 02:21:28 +02:00
test ingress
This commit is contained in:
16
birdnet-go/rootfs/etc/cont-init.d/32-nginx.sh
Normal file
16
birdnet-go/rootfs/etc/cont-init.d/32-nginx.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
set -e
|
||||
|
||||
#################
|
||||
# NGINX SETTING #
|
||||
#################
|
||||
|
||||
declare ingress_interface
|
||||
declare ingress_port
|
||||
|
||||
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/servers/ingress.conf
|
||||
sed -i "s/%%interface%%/${ingress_interface}/g" /etc/nginx/servers/ingress.conf
|
||||
@@ -14,4 +14,10 @@ echo " "
|
||||
########################
|
||||
|
||||
bashio::log.info "Starting app..."
|
||||
/usr/bin/birdnet-go realtime
|
||||
/usr/bin/birdnet-go realtime & true
|
||||
|
||||
# Wait for app to become available to start nginx
|
||||
bashio::net.wait_for 8096 localhost 900
|
||||
bashio::log.info "Starting NGinx..."
|
||||
exec nginx
|
||||
|
||||
|
||||
Reference in New Issue
Block a user