diff --git a/manager.js b/manager.js index 7e3ff94..570b3c1 100644 --- a/manager.js +++ b/manager.js @@ -51,6 +51,8 @@ Manage.create = function(CONF) { // act as a setter Object.keys(conf).forEach(function(k) { + // challenges are either both overwritten, or not set + // this is as it should be config.defaults[k] = conf[k]; }); @@ -122,6 +124,7 @@ Manage.create = function(CONF) { //args.expiresBefore = Date.now() + 45 * 24 * 60 * 60 * 1000; var issuedBefore = args.issuedBefore || Infinity; var expiresBefore = args.expiresBefore || Infinity; //Date.now() + 21 * 24 * 60 * 60 * 1000; + var renewBefore = args.renewBefore || Infinity; //Date.now() + 21 * 24 * 60 * 60 * 1000; // if there's anything to match, only return matches // if there's nothing to match, return everything @@ -144,6 +147,9 @@ Manage.create = function(CONF) { if (site.issuedAt >= issuedBefore) { return false; } + if (site.renewAt >= renewBefore) { + return false; + } // after attribute filtering, before cert filtering if (matchAll) { @@ -308,8 +314,8 @@ doctor.sites = function(config) { if (!sites) { sites = {}; } - if (Array.isArray(sites)) { - sites.forEach(function(site) { + if (Array.isArray(config.sites)) { + config.sites.forEach(function(site) { sites[site.subject] = site; }); } diff --git a/package.json b/package.json index 8f9cad0..524c400 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "greenlock-manager-fs", - "version": "3.0.0", + "version": "3.0.1", "description": "A simple file-based management strategy for Greenlock", "main": "manager.js", "scripts": { @@ -24,7 +24,9 @@ "license": "MPL-2.0", "dependencies": { "@root/mkdirp": "^1.0.0", - "safe-replace": "^1.1.0", + "safe-replace": "^1.1.0" + }, + "devDependencies": { "greenlock-manager-test": "^3.0.0" } }