mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 07:13:09 +02:00
Update error message
This commit is contained in:
parent
c66532d18f
commit
874837666c
1 changed files with 4 additions and 2 deletions
|
@ -122,11 +122,13 @@ async function init(): Promise<Config> {
|
|||
configLogger.info(`Maintainer: ${config.maintainer.name}`);
|
||||
|
||||
if (process.platform === 'linux' && !isRoot() && config.port < 1024) {
|
||||
throw 'You need root privileges to listen on port below 1024 on Linux';
|
||||
Logger.error('You need root privileges to listen on port below 1024 on Linux');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (await portscanner.checkPortStatus(config.port, '127.0.0.1') === 'open') {
|
||||
throw `Port ${config.port} is already in use`;
|
||||
Logger.error(`Port ${config.port} is already in use`)
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Try to connect to MongoDB
|
||||
|
|
Loading…
Reference in a new issue