diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-21 18:29:28 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-21 18:36:08 +0200 |
commit | 23687332e6d7972c6a0eee30ce9056e45dec022b (patch) | |
tree | e29e6128582e69ca815f294aa9c269dcc20ff372 /server.ts | |
parent | 2336a0e7fb5d3d4c6d1489e6882b1fa24975d8c7 (diff) | |
download | PeerTube-23687332e6d7972c6a0eee30ce9056e45dec022b.tar.gz PeerTube-23687332e6d7972c6a0eee30ce9056e45dec022b.tar.zst PeerTube-23687332e6d7972c6a0eee30ce9056e45dec022b.zip |
Improve update host script and add warning if AP urls are invalid
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1,6 +1,4 @@ | |||
1 | // FIXME: https://github.com/nodejs/node/pull/16853 | 1 | // FIXME: https://github.com/nodejs/node/pull/16853 |
2 | import { ScheduleVideoUpdateModel } from './server/models/video/schedule-video-update' | ||
3 | |||
4 | require('tls').DEFAULT_ECDH_CURVE = 'auto' | 2 | require('tls').DEFAULT_ECDH_CURVE = 'auto' |
5 | 3 | ||
6 | import { isTestInstance } from './server/helpers/core-utils' | 4 | import { isTestInstance } from './server/helpers/core-utils' |
@@ -26,7 +24,7 @@ process.title = 'peertube' | |||
26 | const app = express() | 24 | const app = express() |
27 | 25 | ||
28 | // ----------- Core checker ----------- | 26 | // ----------- Core checker ----------- |
29 | import { checkMissedConfig, checkFFmpeg, checkConfig } from './server/initializers/checker' | 27 | import { checkMissedConfig, checkFFmpeg, checkConfig, checkActivityPubUrls } from './server/initializers/checker' |
30 | 28 | ||
31 | // Do not use barrels because we don't want to load all modules here (we need to initialize database first) | 29 | // Do not use barrels because we don't want to load all modules here (we need to initialize database first) |
32 | import { logger } from './server/helpers/logger' | 30 | import { logger } from './server/helpers/logger' |
@@ -191,6 +189,13 @@ async function startApplication () { | |||
191 | 189 | ||
192 | await installApplication() | 190 | await installApplication() |
193 | 191 | ||
192 | // Check activity pub urls are valid | ||
193 | checkActivityPubUrls() | ||
194 | .catch(err => { | ||
195 | logger.error('Error in ActivityPub URLs checker.', { err }) | ||
196 | process.exit(-1) | ||
197 | }) | ||
198 | |||
194 | // Email initialization | 199 | // Email initialization |
195 | Emailer.Instance.init() | 200 | Emailer.Instance.init() |
196 | await Emailer.Instance.checkConnectionOrDie() | 201 | await Emailer.Instance.checkConnectionOrDie() |