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 24, 2019
1 parent bffd087 commit 25f2dc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions traccar/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 Down Expand Up @@ -33,3 +34,5 @@ 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 traccar/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 25f2dc9

Please sign in to comment.