diff --git a/traccar/rootfs/etc/cont-init.d/nginx.sh b/traccar/rootfs/etc/cont-init.d/nginx.sh index f7d6114..99a0708 100644 --- a/traccar/rootfs/etc/cont-init.d/nginx.sh +++ b/traccar/rootfs/etc/cont-init.d/nginx.sh @@ -5,6 +5,7 @@ # ============================================================================== declare port declare certfile +declare hassio_dns declare ingress_interface declare ingress_port declare keyfile @@ -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 diff --git a/traccar/rootfs/etc/nginx/includes/resolver.conf b/traccar/rootfs/etc/nginx/includes/resolver.conf index 758ca69..65c431d 100644 --- a/traccar/rootfs/etc/nginx/includes/resolver.conf +++ b/traccar/rootfs/etc/nginx/includes/resolver.conf @@ -1 +1 @@ -resolver 172.30.32.2; +resolver %%hassio_dns%%;