diff --git a/lib/ddns/index.js b/lib/ddns/index.js index c4a5d21..d089527 100644 --- a/lib/ddns/index.js +++ b/lib/ddns/index.js @@ -124,8 +124,17 @@ module.exports.create = function (deps, conf) { // Since we can't detect the OS level events when a user plugs in an ethernet cable to recheck // what network environment we are in we check our local network address and the gateway to // determine if we need to run the loopback check and router configuration again. - var gw = await network.getGatewayIpAsync(); var addr = await network.getPrivateIpAsync(); + // Until the author of the `network` package publishes the pull request we gave him + // checking the gateway on our units fails because we have the busybox versions of + // the linux commands. Gateway is realistically less important than address, so if + // we fail in getting it go ahead and use the null value. + var gw; + try { + gw = await network.getGatewayIpAsync(); + } catch (err) { + gw = null; + } if (localAddr === addr && gateway === gw) { return; }