Commit 71cfc603 authored by Sheogorath's avatar Sheogorath 🎓

Fix multiple default backends

The entrypoint script was broken as in that multiple backends, as by
default, would result in the daemon breaking as the configuration became
invalid. This was because only the first entry for upstream DNS
providers was properly formatted with a `udp:` as prefix.

This patch fixes the `sed` command to add a proper prefix to all entires
in the config.

The error message caused was:

One of the upstreams has not a (udp|tcp|tcp-tls) prefix e.g. udp:
parent b6120fce
Pipeline #1676 passed with stages
in 3 minutes and 22 seconds
......@@ -33,7 +33,7 @@ path = "/dns-query"
# Upstream DNS resolver
# If multiple servers are specified, a random one will be chosen each time.
upstream = [
$(echo "${UPSTREAM:-|||}" | sed -e 's/^/"udp:/' -e 's/$/"/' -e 's/|/",\n"/g')
$(echo "${UPSTREAM:-|||}" | sed -e 's/^/"udp:/' -e 's/$/"/' -e 's/|/",\n"udp:/g')
# Upstream timeout
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment