diff options
Diffstat (limited to 'server/initializers/checker-after-init.ts')
-rw-r--r-- | server/initializers/checker-after-init.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts index 911734fa0..09f587274 100644 --- a/server/initializers/checker-after-init.ts +++ b/server/initializers/checker-after-init.ts | |||
@@ -153,6 +153,29 @@ function checkConfig () { | |||
153 | } | 153 | } |
154 | } | 154 | } |
155 | 155 | ||
156 | // Object storage | ||
157 | if (CONFIG.OBJECT_STORAGE.ENABLED === true) { | ||
158 | |||
159 | if (!CONFIG.OBJECT_STORAGE.VIDEOS.BUCKET_NAME) { | ||
160 | return 'videos_bucket should be set when object storage support is enabled.' | ||
161 | } | ||
162 | |||
163 | if (!CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS.BUCKET_NAME) { | ||
164 | return 'streaming_playlists_bucket should be set when object storage support is enabled.' | ||
165 | } | ||
166 | |||
167 | if ( | ||
168 | CONFIG.OBJECT_STORAGE.VIDEOS.BUCKET_NAME === CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS.BUCKET_NAME && | ||
169 | CONFIG.OBJECT_STORAGE.VIDEOS.PREFIX === CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS.PREFIX | ||
170 | ) { | ||
171 | if (CONFIG.OBJECT_STORAGE.VIDEOS.PREFIX === '') { | ||
172 | return 'Object storage bucket prefixes should be set when the same bucket is used for both types of video.' | ||
173 | } else { | ||
174 | return 'Object storage bucket prefixes should be set to different values when the same bucket is used for both types of video.' | ||
175 | } | ||
176 | } | ||
177 | } | ||
178 | |||
156 | return null | 179 | return null |
157 | } | 180 | } |
158 | 181 | ||