aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/checker.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-05-14 17:51:15 +0200
committerRigel Kent <par@rigelk.eu>2018-07-14 15:00:56 +0200
commit19f7b248d88805e6595b671a7447b0ba5e1451fa (patch)
tree2b58f538411c8f1d3cffaeef0e63758a7b0b050f /server/initializers/checker.ts
parent4503cb2a894d9fb2b838cab0a9af8b3923e18a56 (diff)
downloadPeerTube-19f7b248d88805e6595b671a7447b0ba5e1451fa.tar.gz
PeerTube-19f7b248d88805e6595b671a7447b0ba5e1451fa.tar.zst
PeerTube-19f7b248d88805e6595b671a7447b0ba5e1451fa.zip
adding redis unix connection
Diffstat (limited to 'server/initializers/checker.ts')
-rw-r--r--server/initializers/checker.ts14
1 files changed, 13 insertions, 1 deletions
diff --git a/server/initializers/checker.ts b/server/initializers/checker.ts
index d5402098f..52a1aeb50 100644
--- a/server/initializers/checker.ts
+++ b/server/initializers/checker.ts
@@ -44,7 +44,6 @@ function checkMissedConfig () {
44 'webserver.https', 'webserver.hostname', 'webserver.port', 44 'webserver.https', 'webserver.hostname', 'webserver.port',
45 'trust_proxy', 45 'trust_proxy',
46 'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password', 46 'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password',
47 'redis.hostname', 'redis.port', 'redis.auth', 'redis.db',
48 'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address', 47 'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address',
49 'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache', 48 'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache',
50 'log.level', 49 'log.level',
@@ -56,6 +55,12 @@ function checkMissedConfig () {
56 'instance.default_nsfw_policy', 'instance.robots', 55 'instance.default_nsfw_policy', 'instance.robots',
57 'services.twitter.username', 'services.twitter.whitelisted' 56 'services.twitter.username', 'services.twitter.whitelisted'
58 ] 57 ]
58 const requiredAlternatives = [
59 [ // set
60 ['redis.hostname', 'redis.port'], // alternative
61 ['redis.socket']
62 ]
63 ]
59 const miss: string[] = [] 64 const miss: string[] = []
60 65
61 for (const key of required) { 66 for (const key of required) {
@@ -64,6 +69,13 @@ function checkMissedConfig () {
64 } 69 }
65 } 70 }
66 71
72 const missingAlternatives = requiredAlternatives.filter(
73 set => !set.find(alternative => !alternative.find(key => !config.has(key)))
74 )
75
76 missingAlternatives
77 .forEach(set => set[0].forEach(key => miss.push(key)))
78
67 return miss 79 return miss
68} 80}
69 81