fix: ln merge issues and deprecate some libs
This commit is contained in:
parent
c9e3fcd9ca
commit
546ba7b780
11 changed files with 4384 additions and 4814 deletions
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const adminServer = require('../lib/admin/admin-server')
|
||||
|
||||
adminServer.run()
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
require('../lib/environment-helper')
|
||||
const login = require('../lib/admin/login')
|
||||
|
||||
const name = process.argv[2]
|
||||
const domain = process.env.HOSTNAME
|
||||
|
||||
if (!domain) {
|
||||
console.error('No hostname configured in the environment')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
if (!name) {
|
||||
console.log('Usage: lamassu-register <username>')
|
||||
process.exit(2)
|
||||
}
|
||||
|
||||
login.generateOTP(name)
|
||||
.then(otp => {
|
||||
if (domain === 'localhost') {
|
||||
console.log(`https://${domain}:8070?otp=${otp}`)
|
||||
} else {
|
||||
console.log(`https://${domain}?otp=${otp}`)
|
||||
}
|
||||
|
||||
process.exit(0)
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('Error: %s', err)
|
||||
process.exit(3)
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue