contabo: fix DNS

we disable the DNS servers in initializeBaseImage. On normal VPS,
unbound seems to start by itself but on contabo it doesn't because
the default unbound config on ubuntu does not work without ip6
This commit is contained in:
Girish Ramakrishnan
2018-12-21 11:40:45 -08:00
parent ecd1d69863
commit 5146e39023
3 changed files with 11 additions and 3 deletions
+2 -1
View File
@@ -231,7 +231,8 @@ function isManaged() {
function hasIPv6() {
const IPV6_PROC_FILE = '/proc/net/if_inet6';
return fs.existsSync(IPV6_PROC_FILE);
// on contabo, /proc/net/if_inet6 is an empty file. so just exists is not enough
return fs.existsSync(IPV6_PROC_FILE) && fs.readFileSync(IPV6_PROC_FILE, 'utf8').trim().length !== 0;
}
// it has to change with the adminLocation so that multiple cloudrons