Add warning for web_videos directory name

This commit is contained in:
Chocobozzz 2023-11-29 09:25:51 +01:00
parent 9f9522e865
commit bda1d751a5
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@peertube/peertube-runner",
"version": "0.0.6",
"version": "0.0.7",
"type": "module",
"main": "dist/peertube-runner.js",
"bin": "dist/peertube-runner.js",

View File

@ -13,6 +13,7 @@ import { OAuthClientModel } from '../models/oauth/oauth-client.js'
import { UserModel } from '../models/user/user.js'
import { CONFIG, getLocalConfigFilePath, isEmailEnabled, reloadConfig } from './config.js'
import { WEBSERVER } from './constants.js'
import { basename } from 'path'
async function checkActivityPubUrls () {
const actor = await getServerActor()
@ -224,6 +225,11 @@ function checkStorageConfig () {
)
}
}
const webVideosDirname = basename(CONFIG.STORAGE.WEB_VIDEOS_DIR)
if (webVideosDirname !== 'web-videos') {
logger.warn(`storage.web_videos configuration should have a "web-videos" directory name (current value: "${webVideosDirname}")`)
}
}
if (CONFIG.STORAGE.WEB_VIDEOS_DIR === CONFIG.STORAGE.REDUNDANCY_DIR) {