From 23687332e6d7972c6a0eee30ce9056e45dec022b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 21 Jun 2018 18:29:28 +0200 Subject: Improve update host script and add warning if AP urls are invalid --- server.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'server.ts') diff --git a/server.ts b/server.ts index ef89ff5f6..f756bf9d4 100644 --- a/server.ts +++ b/server.ts @@ -1,6 +1,4 @@ // FIXME: https://github.com/nodejs/node/pull/16853 -import { ScheduleVideoUpdateModel } from './server/models/video/schedule-video-update' - require('tls').DEFAULT_ECDH_CURVE = 'auto' import { isTestInstance } from './server/helpers/core-utils' @@ -26,7 +24,7 @@ process.title = 'peertube' const app = express() // ----------- Core checker ----------- -import { checkMissedConfig, checkFFmpeg, checkConfig } from './server/initializers/checker' +import { checkMissedConfig, checkFFmpeg, checkConfig, checkActivityPubUrls } from './server/initializers/checker' // Do not use barrels because we don't want to load all modules here (we need to initialize database first) import { logger } from './server/helpers/logger' @@ -191,6 +189,13 @@ async function startApplication () { await installApplication() + // Check activity pub urls are valid + checkActivityPubUrls() + .catch(err => { + logger.error('Error in ActivityPub URLs checker.', { err }) + process.exit(-1) + }) + // Email initialization Emailer.Instance.init() await Emailer.Instance.checkConnectionOrDie() -- cgit v1.2.3