]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add ability to disable plugins/themes from CLI
authorChocobozzz <me@florianbigard.com>
Wed, 17 Jul 2019 13:49:40 +0000 (15:49 +0200)
committerChocobozzz <chocobozzz@cpy.re>
Wed, 24 Jul 2019 08:58:16 +0000 (10:58 +0200)
server.ts

index 67abf4b5cefc901794220b4e72199fe97a7ae5fc..b75c78b0764b506038a5abce15c18a25154c2062 100644 (file)
--- a/server.ts
+++ b/server.ts
@@ -119,6 +119,7 @@ import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-sch
 
 cli
   .option('--no-client', 'Start PeerTube without client interface')
+  .option('--no-plugins', 'Start PeerTube without plugins/themes enabled')
   .parse(process.argv)
 
 // ----------- App -----------
@@ -261,7 +262,7 @@ 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, () => {