set configDir with init

This commit is contained in:
AJ ONeal 2019-11-29 18:14:09 -07:00
parent 63e6ff0b22
commit b99ce6b9a5
2 changed files with 13 additions and 2 deletions

View File

@ -3,14 +3,19 @@
var P = require('../plugins.js'); var P = require('../plugins.js');
var args = process.argv.slice(3); var args = process.argv.slice(3);
var cli = require('./lib/cli.js'); var cli = require('./lib/cli.js');
var Init = require('../lib/init.js');
var Greenlock = require('../'); var Greenlock = require('../');
var Flags = require('./lib/flags.js'); var Flags = require('./lib/flags.js');
var flagOptions = Flags.flags(); var flagOptions = Flags.flags();
var myFlags = {}; var myFlags = {};
['maintainer-email', 'cluster', 'manager', 'manager-xxxx'].forEach(function(k) { [
'config-dir',
'maintainer-email',
'cluster',
'manager',
'manager-xxxx'
].forEach(function(k) {
myFlags[k] = flagOptions[k]; myFlags[k] = flagOptions[k];
}); });
@ -48,6 +53,7 @@ cli.main(async function(argList, flags) {
var greenlock = Greenlock.create({ var greenlock = Greenlock.create({
packageRoot: pkgRoot, packageRoot: pkgRoot,
manager: flags.manager, manager: flags.manager,
configDir: flags.configDir,
maintainerEmail: flags.maintainerEmail, maintainerEmail: flags.maintainerEmail,
_mustPackage: true _mustPackage: true
}); });

View File

@ -67,6 +67,11 @@ Flags.flags = function(mconf, myOpts) {
"the email address of the Let's Encrypt or ACME Account subscriber (not necessarily the domain owner)", "the email address of the Let's Encrypt or ACME Account subscriber (not necessarily the domain owner)",
'string' 'string'
], ],
'config-dir': [
false,
'the directory in which config.json and other config and storage files should be written',
'string'
],
'maintainer-email': [ 'maintainer-email': [
false, false,
'the maintainance contact for security and critical bug notices', 'the maintainance contact for security and critical bug notices',