update to latest lamassu.json
This commit is contained in:
parent
e559548b04
commit
478c6ebe0c
3 changed files with 13 additions and 19 deletions
|
|
@ -15,7 +15,7 @@ var httpOnly = options.httpOnly || argv.http
|
|||
if (!httpOnly) {
|
||||
try {
|
||||
options.https = {
|
||||
key: fs.readFileSync(options.certKeyPath),
|
||||
key: fs.readFileSync(options.keyPath),
|
||||
cert: fs.readFileSync(options.certPath)
|
||||
}
|
||||
} catch (err) {
|
||||
|
|
|
|||
|
|
@ -1,24 +1,20 @@
|
|||
'use strict'
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const os = require('os')
|
||||
|
||||
var fs = require('fs')
|
||||
var path = require('path')
|
||||
var os = require('os')
|
||||
|
||||
var options
|
||||
var configPath
|
||||
let serverConfig
|
||||
|
||||
try {
|
||||
configPath = '/etc/lamassu.json'
|
||||
options = JSON.parse(fs.readFileSync(configPath))
|
||||
} catch (err) {
|
||||
const homeConfigPath = path.resolve(os.homedir(), '.lamassu', 'lamassu.json')
|
||||
serverConfig = JSON.parse(fs.readFileSync(homeConfigPath))
|
||||
} catch (_) {
|
||||
try {
|
||||
configPath = path.resolve(os.homedir(), '.lamassu', 'lamassu.json')
|
||||
console.log(configPath)
|
||||
options = JSON.parse(fs.readFileSync(configPath))
|
||||
} catch (err2) {
|
||||
console.log('Missing configuration file -- exiting.')
|
||||
const globalConfigPath = path.resolve('/etc', 'lamassu', 'lamassu.json')
|
||||
serverConfig = JSON.parse(fs.readFileSync(globalConfigPath))
|
||||
} catch (_) {
|
||||
console.log("Couldn't open config file.")
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = options
|
||||
module.exports = serverConfig
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@
|
|||
"bin": {
|
||||
"lamassu-server": "./bin/lamassu-server",
|
||||
"lamassu-migrate": "./bin/lamassu-migrate",
|
||||
"ssu-raqia": "./bin/ssu-raqia",
|
||||
"ssu": "./bin/ssu",
|
||||
"hkdf": "./bin/hkdf"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue