read from ./vhosts as well

This commit is contained in:
AJ ONeal 2015-10-09 03:59:22 +00:00
parent 36baa5d2c7
commit e0dde70c14
1 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,7 @@
'use strict';
var fs = require('fs');
var path = require('path');
var updateIp = require('../holepunch/helpers/update-ip.js').update;
// TODO XXX use API + storage
var token = require('../dyndns-token.js').token;
@ -82,6 +84,11 @@ module.exports.update = function () {
return all;
}, []);
fs.readdirSync(path.join(__dirname, '..', 'vhosts')).forEach(function (node) {
if (/^\w.*\..*\w$/.test(node)) {
hostnames.push(node);
}
});
return require('./ip-checker').getExternalAddresses().then(function (result) {
//console.log(Object.keys(allMap), result);