mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-03 22:34:11 +02:00
Add ingress
This commit is contained in:
19
netalertx/rootfs/etc/cont-init.d/32-ingress.sh
Normal file
19
netalertx/rootfs/etc/cont-init.d/32-ingress.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
set -e
|
||||
|
||||
#################
|
||||
# NGINX SETTING #
|
||||
#################
|
||||
|
||||
declare ingress_interface
|
||||
declare ingress_port
|
||||
declare ingress_entry
|
||||
|
||||
echo "Adapting for ingress"
|
||||
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/http.d/ingress.conf
|
||||
sed -i "s|%%interface%%|${ingress_interface}|g" /etc/nginx/http.d/ingress.conf
|
||||
sed -i "s|%%ingress_entry%%|${ingress_entry}|g" /etc/nginx/http.d/ingress.conf
|
||||
@@ -4,8 +4,6 @@ set -e
|
||||
|
||||
bashio::log.warning "App starting."
|
||||
|
||||
|
||||
|
||||
# In the addon script, make symlinks on the fly
|
||||
echo "Creating symlinks"
|
||||
for folder in config db; do
|
||||
@@ -24,10 +22,3 @@ sudo chown -R nginx:www-data /config/config/
|
||||
if [ -f /config/db/app.db ]; then
|
||||
chmod a+rwx /config/db/app.db
|
||||
fi
|
||||
|
||||
##############
|
||||
# LAUNCH APP #
|
||||
##############
|
||||
|
||||
#chmod +x /app/dockerfiles/start.sh
|
||||
#/app/dockerfiles/start.sh
|
||||
|
||||
Reference in New Issue
Block a user