Diagnostic tool: add the result of prosodyctl check
in the debug section.
This commit is contained in:
committed by
John Livingston
parent
aa5ff3cfb2
commit
c81c2eb9bb
@ -1,6 +1,6 @@
|
||||
import type { RegisterServerOptions } from '@peertube/peertube-types'
|
||||
import { getProsodyConfig, getProsodyConfigContentForDiagnostic, getWorkingDir } from '../prosody/config'
|
||||
import { getProsodyAbout, testProsodyCorrectlyRunning } from '../prosody/ctl'
|
||||
import { checkProsody, getProsodyAbout, testProsodyCorrectlyRunning } from '../prosody/ctl'
|
||||
import { newResult, TestResult } from './utils'
|
||||
import { getAPIKey } from '../apikey'
|
||||
import * as fs from 'fs'
|
||||
@ -190,6 +190,12 @@ export async function diagProsody (test: string, options: RegisterServerOptions)
|
||||
return result
|
||||
}
|
||||
|
||||
const check = await checkProsody(options)
|
||||
result.debug.push({
|
||||
title: 'Prosody check',
|
||||
message: check
|
||||
})
|
||||
|
||||
// Checking if there is a Prosody error log, and returning last lines.
|
||||
try {
|
||||
await fs.promises.access(prosodyErrorLogPath, fs.constants.R_OK) // throw an error if file does not exist.
|
||||
|
Reference in New Issue
Block a user