rename greenlock config obj

This commit is contained in:
AJ ONeal 2018-06-14 20:18:42 -06:00
parent cfbaf3621e
commit a135d4dd94
1 changed files with 10 additions and 9 deletions

View File

@ -497,7 +497,7 @@ function connectTunnel() {
}; };
state.otp = getOtp(); state.otp = getOtp();
state.greenlock = state.config.greenlock || {}; state.greenlockConf = state.config.greenlock || {};
state.sortingHat = state.config.sortingHat || path.resolve(__dirname, '..', 'lib/sorting-hat.js'); state.sortingHat = state.config.sortingHat || path.resolve(__dirname, '..', 'lib/sorting-hat.js');
// TODO sortingHat.print(); ? // TODO sortingHat.print(); ?
@ -570,13 +570,14 @@ function connectTunnel() {
} }
} }
}; };
console.log();
state.greenlockConfig = { state.greenlockConfig = {
version: state.greenlock.version || 'draft-11' version: state.greenlockConf.version || 'draft-11'
, server: state.greenlock.server || 'https://acme-v02.api.letsencrypt.org/directory' , server: state.greenlockConf.server || 'https://acme-v02.api.letsencrypt.org/directory'
, communityMember: state.greenlock.communityMember || state.config.communityMember , communityMember: state.greenlockConf.communityMember || state.config.communityMember
, telemetry: state.greenlock.telemetry || state.config.telemetry , telemetry: state.greenlockConf.telemetry || state.config.telemetry
, configDir: state.greenlock.configDir || path.resolve(__dirname, '..', 'etc/acme/') , configDir: state.greenlockConf.configDir || path.resolve(__dirname, '..', 'etc/acme/')
// TODO, store: require(state.greenlock.store.name || 'le-store-certbot').create(state.greenlock.store.options || {}) // TODO, store: require(state.greenlockConf.store.name || 'le-store-certbot').create(state.greenlockConf.store.options || {})
, approveDomains: function (opts, certs, cb) { , approveDomains: function (opts, certs, cb) {
// Certs being renewed are listed in certs.altnames // Certs being renewed are listed in certs.altnames
if (certs) { if (certs) {
@ -588,8 +589,8 @@ function connectTunnel() {
// by virtue of the fact that it's being tunneled through a // by virtue of the fact that it's being tunneled through a
// trusted source that is already checking, we're good // trusted source that is already checking, we're good
//if (-1 !== state.config.servernames.indexOf(opts.domains[0])) { //if (-1 !== state.config.servernames.indexOf(opts.domains[0])) {
opts.email = state.greenlock.email || state.config.email; opts.email = state.greenlockConf.email || state.config.email;
opts.agreeTos = state.greenlock.agree || state.config.agreeTos; opts.agreeTos = state.greenlockConf.agree || state.greenlockConf.agreeTos || state.config.agreeTos;
cb(null, { options: opts, certs: certs }); cb(null, { options: opts, certs: certs });
return; return;
//} //}