diff options
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/checker.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/server/initializers/checker.js b/server/initializers/checker.js index 4ecabac77..dad8525fa 100644 --- a/server/initializers/checker.js +++ b/server/initializers/checker.js | |||
@@ -8,12 +8,25 @@ const User = mongoose.model('User') | |||
8 | 8 | ||
9 | const checker = { | 9 | const checker = { |
10 | checkConfig, | 10 | checkConfig, |
11 | checkMissedConfig, | ||
11 | clientsExist, | 12 | clientsExist, |
12 | usersExist | 13 | usersExist |
13 | } | 14 | } |
14 | 15 | ||
15 | // Check the config files | 16 | // Some checks on configuration files |
16 | function checkConfig () { | 17 | function checkConfig () { |
18 | if (config.has('webserver.host')) { | ||
19 | let errorMessage = '`host` config key was renamed to `hostname` but it seems you still have a `host` key in your configuration files!' | ||
20 | errorMessage += ' Please ensure to rename your `host` configuration to `hostname`.' | ||
21 | |||
22 | return errorMessage | ||
23 | } | ||
24 | |||
25 | return null | ||
26 | } | ||
27 | |||
28 | // Check the config files | ||
29 | function checkMissedConfig () { | ||
17 | const required = [ 'listen.port', | 30 | const required = [ 'listen.port', |
18 | 'webserver.https', 'webserver.hostname', 'webserver.port', | 31 | 'webserver.https', 'webserver.hostname', 'webserver.port', |
19 | 'database.hostname', 'database.port', 'database.suffix', | 32 | 'database.hostname', 'database.port', 'database.suffix', |