-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathconfig.js
38 lines (38 loc) · 1 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
module.exports = require('yargs')
.usage('Usage: $0 [options]')
.describe('a', 'unifi hostname or address')
.describe('p', 'unifi port')
.describe('c', 'unifi user')
.describe('s', 'unifi password')
.describe('w', 'unifi site')
.describe('k', 'allow ssl connections with invalid certs')
.describe('v', 'possible values: "error", "warn", "info", "debug"')
.describe('n', 'instance name. used as topic prefix')
.describe('u', 'mqtt broker url')
.describe('h', 'show help')
.alias({
a: 'unifi-host',
p: 'unifi-port',
c: 'unifi-user',
s: 'unifi-password',
w: 'unifi-site',
h: 'help',
n: 'name',
u: 'url',
v: 'verbosity',
k: 'insecure'
})
.default({
a: '127.0.0.1',
p: 8443,
c: 'admin',
u: 'mqtt://127.0.0.1',
n: 'unifi',
v: 'info',
w: 'default'
})
.demand('unifi-password')
.env()
.version()
.help('help')
.argv;