From 12e4a47855dc8a0eb0b5eb05022385029cde75de Mon Sep 17 00:00:00 2001 From: tigerbot Date: Wed, 4 Oct 2017 11:49:05 -0600 Subject: [PATCH] removed addresses and cwd from the config --- bin/goldilocks.js | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/bin/goldilocks.js b/bin/goldilocks.js index 51d77d2..908da13 100755 --- a/bin/goldilocks.js +++ b/bin/goldilocks.js @@ -178,38 +178,6 @@ function fillConfig(config, args) { config.email = args.email; config.tls.acme.email = args.email; } - - // maybe this should not go in config... but be ephemeral in some way? - config.cwd = args.cwd || config.cwd || process.cwd(); - - var ipaddr = require('ipaddr.js'); - var addresses = []; - var ifaces = require('../lib/local-ip.js').find(); - - Object.keys(ifaces).forEach(function (ifacename) { - var iface = ifaces[ifacename]; - iface.ipv4.forEach(function (ip) { - addresses.push(ip); - }); - iface.ipv6.forEach(function (ip) { - addresses.push(ip); - }); - }); - - addresses.sort(function (a, b) { - if (a.family !== b.family) { - return 'IPv4' === a.family ? 1 : -1; - } - - return a.address > b.address ? 1 : -1; - }); - - addresses.forEach(function (addr) { - addr.range = ipaddr.parse(addr.address).range(); - }); - - // TODO maybe move to config.state.addresses (?) - config.addresses = addresses; config.device = { hostname: require('os').hostname() }; config.tunnel = args.tunnel || config.tunnel;