MAJOR: Updates for Authenticated Web UI and CLI #30
| @ -546,6 +546,10 @@ function parseConfig(err, text) { | |||||||
|           } else { |           } else { | ||||||
|             console.info('> Rejecting SSH-over-HTTPS for now'); |             console.info('> Rejecting SSH-over-HTTPS for now'); | ||||||
|           } |           } | ||||||
|  |         } else if ('status' === body.module) { | ||||||
|  |           // TODO funny one this one
 | ||||||
|  |           console.info('http://localhost:' + (body.port || state.config.ipc.port)); | ||||||
|  |           console.info(JSON.stringify(body, null, 2)); | ||||||
|         } else { |         } else { | ||||||
|           console.info(JSON.stringify(body, null, 2)); |           console.info(JSON.stringify(body, null, 2)); | ||||||
|         } |         } | ||||||
|  | |||||||
| @ -88,6 +88,12 @@ module.exports.create = function (state) { | |||||||
|     if (fs.existsSync(portFile)) { |     if (fs.existsSync(portFile)) { | ||||||
|       reqOpts.host = 'localhost'; |       reqOpts.host = 'localhost'; | ||||||
|       reqOpts.port = parseInt(fs.readFileSync(portFile, 'utf8').trim(), 10); |       reqOpts.port = parseInt(fs.readFileSync(portFile, 'utf8').trim(), 10); | ||||||
|  |       if (!state.config.ipc) { | ||||||
|  |         state.config.ipc = {}; | ||||||
|  |       } | ||||||
|  |       state.config.ipc.type = 'port'; | ||||||
|  |       state.config.ipc.path = path.dirname(state._ipc.path); | ||||||
|  |       state.config.ipc.port = reqOpts.port; | ||||||
|     } else { |     } else { | ||||||
|       reqOpts.socketPath = state._ipc.path; |       reqOpts.socketPath = state._ipc.path; | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user