Skip to content

Commit

Permalink
🔨 Use Hass.io DNS as NGinx resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Aug 21, 2019
1 parent abf64e0 commit 0626a0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions log-viewer/rootfs/etc/cont-init.d/nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# ==============================================================================
declare port
declare certfile
declare hassio_dns
declare ingress_interface
declare ingress_port
declare keyfile
Expand All @@ -30,3 +31,6 @@ 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

hassio_dns=$(bashio::dns.host)
sed -i "s/%%hassio_dns%%/${hassio_dns}/g" /etc/nginx/includes/resolver.conf
2 changes: 1 addition & 1 deletion log-viewer/rootfs/etc/nginx/includes/resolver.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
resolver 172.30.32.2;
resolver %%hassio_dns%%;

0 comments on commit 0626a0e

Please sign in to comment.