From 68a4769f1e44260ebd2a162bf8b906aae6496951 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Sat, 22 Dec 2018 19:48:14 -0800 Subject: [PATCH] Fix typo --- baseimage/initializeBaseUbuntuImage.sh | 2 +- setup/start.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/baseimage/initializeBaseUbuntuImage.sh b/baseimage/initializeBaseUbuntuImage.sh index 59619608b..6a3809083 100644 --- a/baseimage/initializeBaseUbuntuImage.sh +++ b/baseimage/initializeBaseUbuntuImage.sh @@ -127,7 +127,7 @@ systemctl disable systemd-resolved || true # ubuntu's default config for unbound does not work if ipv6 is disabled. this config is overwritten in start.sh # we need unbound to work as this is required for installer.sh to do any DNS requests -ip6=[[ -s /proc/net/if_inet6 ]] && echo "yes" || echo "no" +ip6=$([[ -s /proc/net/if_inet6 ]] && echo "yes" || echo "no") echo -e "server:\n\tinterface: 127.0.0.1\n\tdo-ip6: ${ip6}" > /etc/unbound/unbound.conf.d/cloudron-network.conf systemctl restart unbound diff --git a/setup/start.sh b/setup/start.sh index 396d3edbd..4ae376419 100755 --- a/setup/start.sh +++ b/setup/start.sh @@ -92,7 +92,7 @@ echo "==> Setting up unbound" # We do not use dnsmasq because it is not a recursive resolver and defaults to the value in the interfaces file (which is Google DNS!) # We listen on 0.0.0.0 because there is no way control ordering of docker (which creates the 172.18.0.0/16) and unbound # If IP6 is not enabled, dns queries seem to fail on some hosts. -s returns false if file missing or 0 size -ip6=[[ -s /proc/net/if_inet6 ]] && echo "yes" || echo "no" +ip6=$([[ -s /proc/net/if_inet6 ]] && echo "yes" || echo "no") echo -e "server:\n\tinterface: 0.0.0.0\n\tdo-ip6: ${ip6}\n\taccess-control: 127.0.0.1 allow\n\taccess-control: 172.18.0.1/16 allow\n\tcache-max-negative-ttl: 30\n\tcache-max-ttl: 300\n\t#logfile: /var/log/unbound.log\n\t#verbosity: 10" > /etc/unbound/unbound.conf.d/cloudron-network.conf # update the root anchor after a out-of-disk-space situation (see #269) unbound-anchor -a /var/lib/unbound/root.key