sysinfo: add interface to get IPv6 address
This commit is contained in:
+3
-3
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user