]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server.ts
Update CentOS 7 dependencies install (#2004)
[github/Chocobozzz/PeerTube.git] / server.ts
index 67abf4b5cefc901794220b4e72199fe97a7ae5fc..abfeeed2e02ad5a2f17b2f56a347bdebbdc88570 100644 (file)
--- a/server.ts
+++ b/server.ts
@@ -114,11 +114,13 @@ import { isHTTPSignatureDigestValid } from './server/helpers/peertube-crypto'
 import { PeerTubeSocket } from './server/lib/peertube-socket'
 import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls'
 import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler'
+import { Hooks } from './server/lib/plugins/hooks'
 
 // ----------- Command line -----------
 
 cli
   .option('--no-client', 'Start PeerTube without client interface')
+  .option('--no-plugins', 'Start PeerTube without plugins/themes enabled')
   .parse(process.argv)
 
 // ----------- App -----------
@@ -261,14 +263,14 @@ async function startApplication () {
   updateStreamingPlaylistsInfohashesIfNeeded()
     .catch(err => logger.error('Cannot update streaming playlist infohashes.', { err }))
 
-  await PluginManager.Instance.registerPluginsAndThemes()
+  if (cli.plugins) await PluginManager.Instance.registerPluginsAndThemes()
 
   // Make server listening
   server.listen(port, hostname, () => {
     logger.info('Server listening on %s:%d', hostname, port)
     logger.info('Web server: %s', WEBSERVER.URL)
 
-    PluginManager.Instance.runHook('action:application.listening')
+    Hooks.runAction('action:application.listening')
   })
 
   process.on('exit', () => {