Merge remote-tracking branch 'origin/release-8.1' into chore/merge-8.1-into-8.6-2023-10-22
This commit is contained in:
commit
416744baf3
31 changed files with 3327 additions and 2533 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