sysinfo: add interface to get IPv6 address

This commit is contained in:
Girish Ramakrishnan
2022-01-05 18:07:36 -08:00
parent 235d18cbb1
commit bbf1a5af3d
13 changed files with 100 additions and 32 deletions
+3 -3
View File
@@ -137,7 +137,7 @@ async function checkDnsRecords(location, domain) {
const values = await getDnsRecords(location, domain, 'A');
const ip = await sysinfo.getServerIp();
const ip = await sysinfo.getServerIPv4();
if (values.length === 0) return { needsOverwrite: false }; // does not exist
if (values[0] === ip) return { needsOverwrite: false }; // exists but in sync
@@ -204,7 +204,7 @@ async function registerLocations(locations, options, progressCallback) {
const overwriteDns = options.overwriteDns || false;
const ip = await sysinfo.getServerIp();
const ip = await sysinfo.getServerIPv4();
for (const location of locations) {
const error = await promiseRetry({ times: 200, interval: 5000, debug }, async function () { // returns error to abort the "retry"
@@ -240,7 +240,7 @@ async function unregisterLocations(locations, progressCallback) {
assert(Array.isArray(locations));
assert.strictEqual(typeof progressCallback, 'function');
const ip = await sysinfo.getServerIp();
const ip = await sysinfo.getServerIPv4();
for (const location of locations) {
const error = await promiseRetry({ times: 30, interval: 5000, debug }, async function () { // returns error to abort the "retry"