read from ./vhosts as well
This commit is contained in:
parent
36baa5d2c7
commit
e0dde70c14
|
@ -1,5 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
var fs = require('fs');
|
||||||
|
var path = require('path');
|
||||||
var updateIp = require('../holepunch/helpers/update-ip.js').update;
|
var updateIp = require('../holepunch/helpers/update-ip.js').update;
|
||||||
// TODO XXX use API + storage
|
// TODO XXX use API + storage
|
||||||
var token = require('../dyndns-token.js').token;
|
var token = require('../dyndns-token.js').token;
|
||||||
|
@ -82,6 +84,11 @@ module.exports.update = function () {
|
||||||
|
|
||||||
return all;
|
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) {
|
return require('./ip-checker').getExternalAddresses().then(function (result) {
|
||||||
//console.log(Object.keys(allMap), result);
|
//console.log(Object.keys(allMap), result);
|
||||||
|
|
Loading…
Reference in New Issue