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