require --server

This commit is contained in:
AJ ONeal 2016-08-11 11:39:10 -06:00
parent cac4e79c22
commit 9b667f0c28
2 changed files with 5 additions and 1 deletions

View File

@ -20,7 +20,7 @@ cli.parse({
, 'domain-key-path': [ false, " Path to privkey.pem to use for domain (default: generate new)", 'string' ]
, 'account-key-path': [ false, " Path to privkey.pem to use for account (default: generate new)", 'string' ]
, 'config-dir': [ false, " Configuration directory.", 'string', '~/letsencrypt/etc/' ]
, server: [ false, " ACME Directory Resource URI.", 'string', 'https://acme-v01.api.letsencrypt.org/directory)' ]
, server: [ false, " ACME Directory Resource URI.", 'string', '' ]
, standalone: [ false, " Obtain certs using a \"standalone\" webserver.", 'boolean', false ]
, manual: [ false, " Print the token and key to the screen and wait for you to hit enter, giving you time to copy it somewhere before continuing (default: false)", 'boolean', false ]
, webroot: [ false, " Obtain certs by placing files in a webroot directory.", 'boolean', false ]

View File

@ -46,6 +46,10 @@ module.exports.run = function (args) {
, accountKeyPath: args.accountKeyPath
});
if (!args.server) {
throw new Error("You must specify a server to use with --server");
}
// let LE know that we're handling standalone / webroot here
var le = LE.create({
debug: args.debug