ddns config fixes
This commit is contained in:
parent
4f23dae53e
commit
e45264673a
|
@ -38,7 +38,7 @@ module.exports.update = function (opts) {
|
||||||
options.ca = opts.cacert;
|
options.ca = opts.cacert;
|
||||||
}
|
}
|
||||||
|
|
||||||
options.ca = options.ca.map(function (str) {
|
options.ca = (options.ca||[]).map(function (str) {
|
||||||
if ('string' === typeof str && str.length < 1000) {
|
if ('string' === typeof str && str.length < 1000) {
|
||||||
str = fs.readFileAsync(str);
|
str = fs.readFileAsync(str);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,8 @@ function update(hostnames, addresses) {
|
||||||
// TODO use API to add and remove nameservers
|
// TODO use API to add and remove nameservers
|
||||||
var services = [
|
var services = [
|
||||||
// TODO XXX don't disable cacert checking
|
// TODO XXX don't disable cacert checking
|
||||||
{ hostname: 'ns1.redirect-www.org', port: 65443, cacert: false, pathname: '/api/dns' }
|
{ hostname: 'ns1.redirect-www.org', port: 6443, cacert: false, pathname: '/api/com.daplie.dns/ddns' }
|
||||||
, { hostname: 'ns2.redirect-www.org', port: 65443, cacert: false, pathname: '/api/dns' }
|
, { hostname: 'ns2.redirect-www.org', port: 6443, cacert: false, pathname: '/api/com.daplie.dns/ddns' }
|
||||||
// { cacert = [path.join(__dirname, '..', 'certs', 'ca', 'my-root-ca.crt.pem')] };
|
// { cacert = [path.join(__dirname, '..', 'certs', 'ca', 'my-root-ca.crt.pem')] };
|
||||||
];
|
];
|
||||||
var answers = [];
|
var answers = [];
|
||||||
|
@ -52,8 +52,9 @@ function update(hostnames, addresses) {
|
||||||
|
|
||||||
promises = services.map(function (service, i) {
|
promises = services.map(function (service, i) {
|
||||||
return updateIp({
|
return updateIp({
|
||||||
updater: service.hostname
|
hostname: service.hostname
|
||||||
, port: service.port
|
, port: service.port
|
||||||
|
, pathname: service.pathname
|
||||||
, cacert: service.cacert
|
, cacert: service.cacert
|
||||||
, token: token
|
, token: token
|
||||||
, ddns: answers
|
, ddns: answers
|
||||||
|
|
Loading…
Reference in New Issue