make ipv4 and ipv6 settings separate
This commit is contained in:
@@ -243,13 +243,12 @@ async function waitForDnsPropagation(app) {
|
||||
}
|
||||
|
||||
const ipv4 = await sysinfo.getServerIPv4();
|
||||
const ipv6Enabled = await settings.getIPv6Config();
|
||||
const ipv6 = ipv6Enabled ? await sysinfo.getServerIPv6() : null;
|
||||
const ipv6 = await sysinfo.getServerIPv6();
|
||||
|
||||
let error;
|
||||
[error] = await safe(dns.waitForDnsRecord(app.subdomain, app.domain, 'A', ipv4, { times: 240 }));
|
||||
if (error) throw new BoxError(BoxError.DNS_ERROR, `DNS A Record is not synced yet: ${error.message}`, { ipv4, subdomain: app.subdomain, domain: app.domain });
|
||||
if (ipv6Enabled) {
|
||||
if (ipv6) {
|
||||
[error] = await safe(dns.waitForDnsRecord(app.subdomain, app.domain, 'AAAA', ipv6, { times: 240 }));
|
||||
if (error) throw new BoxError(BoxError.DNS_ERROR, `DNS AAAA Record is not synced yet: ${error.message}`, { ipv6, subdomain: app.subdomain, domain: app.domain });
|
||||
}
|
||||
@@ -259,11 +258,10 @@ async function waitForDnsPropagation(app) {
|
||||
for (const domain of allDomains) {
|
||||
[error] = await safe(dns.waitForDnsRecord(domain.subdomain, domain.domain, 'A', ipv4, { times: 240 }));
|
||||
if (error) throw new BoxError(BoxError.DNS_ERROR, `DNS A Record is not synced yet: ${error.message}`, { ipv4, subdomain: domain.subdomain, domain: domain.domain });
|
||||
if (ipv6Enabled) {
|
||||
if (ipv6) {
|
||||
[error] = await safe(dns.waitForDnsRecord(domain.subdomain, domain.domain, 'AAAA', ipv6, { times: 240 }));
|
||||
if (error) throw new BoxError(BoxError.DNS_ERROR, `DNS AAAA Record is not synced yet: ${error.message}`, { ipv6, subdomain: domain.subdomain, domain: domain.domain });
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user