Prosody: new settings to provide a custom certificates dir

This commit is contained in:
John Livingston
2023-04-13 18:22:03 +02:00
committed by John Livingston
parent a87a622cba
commit 801798852c
12 changed files with 205 additions and 71 deletions

View File

@ -80,6 +80,14 @@ export async function diagProsody (test: string, options: RegisterServerOptions)
}
result.messages.push(`Room content will be saved for '${wantedConfig.logExpiration.value}'`)
if (wantedConfig.paths.certs === undefined) {
result.messages.push({
level: 'error',
message: 'Error: The certificates path is misconfigured.'
})
return result
}
await fs.promises.access(filePath, fs.constants.R_OK) // throw an error if file does not exist.
result.messages.push(`The prosody configuration file (${filePath}) exists`)
const actualContent = await fs.promises.readFile(filePath, {