updates
This commit is contained in:
		
							parent
							
								
									3582b59bd2
								
							
						
					
					
						commit
						2b2c9a2081
					
				| @ -58,6 +58,12 @@ cli.main(function(_, options) { | |||||||
|     args.domains = args.domains.split(','); |     args.domains = args.domains.split(','); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |   if (!(Array.isArray(args.domains) && args.domains.length) || !args.email || !args.agreeTos) { | ||||||
|  |     console.error("\nUsage: letsencrypt certonly --standalone --domains example.com --email user@example.com --agree-tos"); | ||||||
|  |     console.error("\nSee letsencrypt --help for more details\n"); | ||||||
|  |     return; | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|   if (args.tlsSni01Port) { |   if (args.tlsSni01Port) { | ||||||
|     args.tlsSni01Port = args.tlsSni01Port.split(',').map(function (port) { |     args.tlsSni01Port = args.tlsSni01Port.split(',').map(function (port) { | ||||||
|       return parseInt(port, 10); |       return parseInt(port, 10); | ||||||
| @ -89,7 +95,15 @@ cli.main(function(_, options) { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // let LE know that we're handling standalone / webroot here
 |     // let LE know that we're handling standalone / webroot here
 | ||||||
|     LE.create({ manual: true }, handlers).register(args, function (err, results) { |     LE.create({ | ||||||
|  |       manual: true | ||||||
|  |     , debug: args.debug | ||||||
|  |     , configDir: args.configDir | ||||||
|  |     , privkeyPath: ':conf/live/:hostname/privkey.pem' //args.privkeyPath
 | ||||||
|  |     , fullchainPath: args.fullchainPath | ||||||
|  |     , certPath: args.certPath | ||||||
|  |     , chainPath: args.chainPath | ||||||
|  |     }, handlers).register(args, function (err, results) { | ||||||
|       if (err) { |       if (err) { | ||||||
|         console.error('[Error]: letsencrypt'); |         console.error('[Error]: letsencrypt'); | ||||||
|         console.error(err); |         console.error(err); | ||||||
| @ -101,8 +115,14 @@ cli.main(function(_, options) { | |||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       // should get back account, path to certs, pems, etc?
 |       // should get back account, path to certs, pems, etc?
 | ||||||
|       console.log('results'); |       console.log('\nCertificates installed at:'); | ||||||
|       console.log(results); |       console.log(Object.keys(results).filter(function (key) { | ||||||
|  |         return /Path/.test(key); | ||||||
|  |       }).map(function (key) { | ||||||
|  |         return results[key]; | ||||||
|  |       }).join('\n')); | ||||||
|  | 
 | ||||||
|  |       process.exit(0); | ||||||
|     }); |     }); | ||||||
|   }); |   }); | ||||||
| }); | }); | ||||||
|  | |||||||
| @ -38,7 +38,8 @@ module.exports.create = function () { | |||||||
|         res.end(val || '_'); |         res.end(val || '_'); | ||||||
|       }); |       }); | ||||||
|     } |     } | ||||||
|   , startServers: function (plainPorts, tlsPorts) { |   , startServers: function (plainPorts, tlsPorts, opts) { | ||||||
|  |       opts = opts || {}; | ||||||
|       var httpsOptions = require('localhost.daplie.com-certificates'); |       var httpsOptions = require('localhost.daplie.com-certificates'); | ||||||
|       var https = require('https'); |       var https = require('https'); | ||||||
|       var http = require('http'); |       var http = require('http'); | ||||||
| @ -50,12 +51,16 @@ module.exports.create = function () { | |||||||
| 
 | 
 | ||||||
|       plainPorts.forEach(function (port) { |       plainPorts.forEach(function (port) { | ||||||
|         http.createServer(handlers.httpResponder).listen(port, function () { |         http.createServer(handlers.httpResponder).listen(port, function () { | ||||||
|           console.info('Listening http on', this.address()); |           if (opts.debug) { | ||||||
|  |             console.info('Listening http on', this.address()); | ||||||
|  |           } | ||||||
|         }); |         }); | ||||||
|       }); |       }); | ||||||
|       tlsPorts.forEach(function (port) { |       tlsPorts.forEach(function (port) { | ||||||
|         https.createServer(httpsOptions, handlers.httpResponder).listen(port, function () { |         https.createServer(httpsOptions, handlers.httpResponder).listen(port, function () { | ||||||
|           console.info('Listening https on', this.address()); |           if (opts.debug) { | ||||||
|  |             console.info('Listening https on', this.address()); | ||||||
|  |           } | ||||||
|         }); |         }); | ||||||
|       }); |       }); | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user