Browse Source

init before renew

v3
AJ ONeal 4 years ago
parent
commit
fa8d1d76b3
  1. 6
      greenlock.js
  2. 12
      plugins.js

6
greenlock.js

@ -261,8 +261,10 @@ G.create = function(gconf) {
// needs to get info about the renewal, such as which store and challenge(s) to use
greenlock.renew = function(args) {
return manager.defaults().then(function(mconf) {
return greenlock._renew(mconf, args);
return greenlock._init().then(function() {
return manager.defaults().then(function(mconf) {
return greenlock._renew(mconf, args);
});
});
};
greenlock._renew = function(mconf, args) {

12
plugins.js

@ -187,14 +187,22 @@ P._normalizeChallenge = function(name, ch) {
};
P._loadSync = function(modname) {
var mod;
try {
return require(modname);
} catch (e) {
console.error("Could not load '%s'", modname);
console.error('Did you install it?');
console.error('\tnpm install --save %s', modname);
throw e;
}
/*
try {
mod = require(modname);
} catch (e) {
P._installSync(modname);
mod = require(modname);
}
return mod;
*/
};
P._installSync = function(moduleName) {

Loading…
Cancel
Save