mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-08 05:31:55 +00:00
Add the insecure launching option to homebridge cli.
This commit is contained in:
@@ -10,15 +10,18 @@ var log = require("./logger")._system;
|
||||
|
||||
module.exports = function() {
|
||||
|
||||
var insecureAccess = false;
|
||||
|
||||
program
|
||||
.version(version)
|
||||
.option('-P, --plugin-path [path]', 'look for plugins installed at [path] as well as the default locations ([path] can also point to a single plugin)', function(p) { Plugin.addPluginPath(p); })
|
||||
.option('-U, --user-storage-path [path]', 'look for homebridge user files at [path] instead of the default location (~/.homebridge)', function(p) { User.setStoragePath(p); })
|
||||
.option('-D, --debug', 'turn on debug level logging', function() { require('./logger').setDebugEnabled(true) })
|
||||
.option('-I, --insecure', 'allow insecure access to homebridge', function() { insecureAccess = true; })
|
||||
.parse(process.argv);
|
||||
|
||||
// Initialize HAP-NodeJS with a custom persist directory
|
||||
hap.init(User.persistPath());
|
||||
|
||||
new Server().run();
|
||||
new Server(insecureAccess).run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user