Diagnostic tool: add the result of prosodyctl check in the debug section.

This commit is contained in:
John Livingston
2023-04-07 14:34:10 +02:00
committed by John Livingston
parent aa5ff3cfb2
commit c81c2eb9bb
3 changed files with 19 additions and 1 deletions

View File

@ -158,6 +158,11 @@ async function reloadProsody (options: RegisterServerOptions): Promise<boolean>
return true
}
async function checkProsody (options: RegisterServerOptions): Promise<string> {
const ctl = await prosodyCtl(options, 'check')
return ctl.message
}
interface ProsodyRunning {
ok: boolean
messages: string[]
@ -341,6 +346,7 @@ async function ensureProsodyNotRunning (options: RegisterServerOptions): Promise
export {
getProsodyAbout,
checkProsody,
testProsodyRunning,
testProsodyCorrectlyRunning,
prepareProsody,