#120: adding a certs directory to avoid Prosody error logs.
This commit is contained in:
parent
34ebfb4c67
commit
24696acdbe
@ -10,6 +10,8 @@ script:
|
||||
- mkdir -p AppDir/usr/bin
|
||||
# Copy the launcher code into the AppDir
|
||||
- cp ./launcher.lua AppDir/usr/bin/
|
||||
# Creating the /etc/prosody/certs folder to avoid unecessary errors
|
||||
- mkdir -p AppDir/etc/prosody/certs
|
||||
|
||||
AppDir:
|
||||
path: ./AppDir
|
||||
|
@ -10,6 +10,8 @@ script:
|
||||
- mkdir -p AppDir/usr/bin
|
||||
# Copy the launcher code into the AppDir
|
||||
- cp ./launcher.lua AppDir/usr/bin/
|
||||
# Creating the /etc/prosody/certs folder to avoid unecessary errors
|
||||
- mkdir -p AppDir/etc/prosody/certs
|
||||
|
||||
AppDir:
|
||||
path: ./AppDir
|
||||
|
@ -63,6 +63,9 @@ async function getProsodyFilePaths (options: RegisterServerOptions): Promise<Pro
|
||||
log: path.resolve(dir, 'prosody.log'),
|
||||
config: path.resolve(dir, 'prosody.cfg.lua'),
|
||||
data: path.resolve(dir, 'data'),
|
||||
// Certificates dir for Prosody.
|
||||
// Note: not used yet, but we create the directory to avoid errors in prosody logs.
|
||||
certs: path.resolve(dir, 'certs'),
|
||||
modules: path.resolve(__dirname, '../../prosody-modules'),
|
||||
avatars: path.resolve(__dirname, '../../avatars'),
|
||||
exec,
|
||||
|
@ -5,6 +5,7 @@ interface ProsodyFilePaths {
|
||||
log: string
|
||||
config: string
|
||||
data: string
|
||||
certs: string
|
||||
modules: string
|
||||
avatars: string
|
||||
exec: string
|
||||
|
@ -9,6 +9,7 @@ async function _ensureWorkingDir (
|
||||
options: RegisterServerOptions,
|
||||
workingDir: string,
|
||||
dataDir: string,
|
||||
certsDir: string,
|
||||
appImageExtractPath: string
|
||||
): Promise<string> {
|
||||
const logger = options.peertubeHelpers.logger
|
||||
@ -29,6 +30,14 @@ async function _ensureWorkingDir (
|
||||
logger.debug(`data dir ${dataDir} was created`)
|
||||
}
|
||||
|
||||
if (!fs.existsSync(certsDir)) {
|
||||
// Certificates dir for Prosody.
|
||||
// Note: not used yet, but we create the directory to avoid errors in prosody logs.
|
||||
logger.info(`The certs dir ${certsDir} does not exists, trying to create it`)
|
||||
await fs.promises.mkdir(certsDir)
|
||||
logger.debug(`certs dir ${certsDir} was created`)
|
||||
}
|
||||
|
||||
if (!fs.existsSync(appImageExtractPath)) {
|
||||
logger.info(`The appImageExtractPath dir ${appImageExtractPath} does not exists, trying to create it`)
|
||||
await fs.promises.mkdir(appImageExtractPath)
|
||||
@ -49,7 +58,7 @@ async function prepareProsody (options: RegisterServerOptions): Promise<void> {
|
||||
const filePaths = await getProsodyFilePaths(options)
|
||||
|
||||
logger.debug('Ensuring that the working dir exists')
|
||||
await _ensureWorkingDir(options, filePaths.dir, filePaths.data, filePaths.appImageExtractPath)
|
||||
await _ensureWorkingDir(options, filePaths.dir, filePaths.data, filePaths.certs, filePaths.appImageExtractPath)
|
||||
|
||||
const appImageToExtract = filePaths.appImageToExtract
|
||||
if (!appImageToExtract) {
|
||||
|
Loading…
Reference in New Issue
Block a user