Merge pull request #2293 from overleaf/as-remove-unused-user

Remove unused arg parsing when creating server

GitOrigin-RevId: f998c9039280e40f56e5e4814e5a10b1ac89a69e
This commit is contained in:
Eric Mc Sween 2019-10-28 10:06:00 -04:00 committed by sharelatex
parent f1d96a3d56
commit 66ed04eef5
2 changed files with 0 additions and 20 deletions

View file

@ -25,17 +25,6 @@ if ((Settings.sentry != null ? Settings.sentry.dsn : undefined) != null) {
metrics.memory.monitor(logger)
const Server = require('./app/src/infrastructure/Server')
const { argv } = require('optimist')
.options('user', {
alias: 'u',
description: 'Run the server with permissions of the specified user'
})
.options('group', {
alias: 'g',
description: 'Run the server with permissions of the specified group'
})
.usage('Usage: $0')
if (Settings.catchErrors) {
process.removeAllListeners('uncaughtException')
process.on('uncaughtException', error =>
@ -51,14 +40,6 @@ if (!module.parent) {
logger.info(`${require('http').globalAgent.maxSockets} sockets enabled`)
// wait until the process is ready before monitoring the event loop
metrics.event_loop.monitor(logger)
if (argv.user) {
process.setuid(argv.user)
logger.info(`Running as user: ${argv.user}`)
}
if (argv.group) {
process.setgid(argv.group)
return logger.info(`Running as group: ${argv.group}`)
}
})
}

View file

@ -88,7 +88,6 @@
"nodemailer-ses-transport": "^1.3.0",
"nvd3": "^1.8.6",
"oauth2-server": "^3.0.1",
"optimist": "0.6.1",
"p-limit": "^2.2.1",
"passport": "^0.3.2",
"passport-google-oauth20": "^1.0.0",