Browse Source
Merge pull request #77 from torkelrogstad/master
Linux support
renovate/lint-staged-8.x
JimmyMow
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
18 additions and
2 deletions
-
app/lnd/config/index.js
|
|
@ -2,10 +2,26 @@ |
|
|
|
// Mac OS X: /Users/user/Library/Application Support/Lnd/tls.cert
|
|
|
|
// Linux: ~/.lnd/tls.cert
|
|
|
|
// Windows: TODO find out where cert is located for windows machine
|
|
|
|
import { userInfo } from 'os' |
|
|
|
import { userInfo, platform } from 'os' |
|
|
|
import { join } from 'path' |
|
|
|
|
|
|
|
let loc |
|
|
|
switch (platform()) { |
|
|
|
case 'darwin': |
|
|
|
loc = 'Library/Application\ Support/Lnd/tls.cert' |
|
|
|
break |
|
|
|
case 'linux': |
|
|
|
loc = '.lnd/tls.cert' |
|
|
|
break |
|
|
|
case 'win32': |
|
|
|
loc = join('Appdata', 'Local', 'Lnd', 'tls.cert') |
|
|
|
break |
|
|
|
default: |
|
|
|
break |
|
|
|
} |
|
|
|
|
|
|
|
export default { |
|
|
|
lightningRpc: `${__dirname}/rpc.proto`, |
|
|
|
lightningHost: 'localhost:10009', |
|
|
|
cert: `/Users/${userInfo().username}/Library/Application Support/Lnd/tls.cert` |
|
|
|
cert: join(userInfo().homedir, loc) |
|
|
|
} |
|
|
|