From 127900a4d41d82a3ca24b23ad0b4fc4f8003fc13 Mon Sep 17 00:00:00 2001 From: Tomas Bures Date: Sat, 12 Jan 2019 11:53:07 +0100 Subject: [PATCH] Services enabled back to normal --- server/index.js | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/server/index.js b/server/index.js index 33860774..924f0424 100644 --- a/server/index.js +++ b/server/index.js @@ -84,33 +84,26 @@ dbcheck(err => { // Check if database needs upgrading before starting the server .then(() => shares.regenerateRoleNamesTable()) .then(() => shares.rebuildPermissions()) -/* +/* Simplified startup without services - only for debugging the UI and models .then(() => - testServer(() => { - senders.spawn(() => { - }); - }) + startHTTPServer(AppType.TRUSTED, 'trusted', trustedPort, () => + startHTTPServer(AppType.SANDBOXED, 'sandbox', sandboxPort, () => + startHTTPServer(AppType.PUBLIC, 'public', publicPort, async () => { + + await privilegeHelpers.ensureMailtrainDir(uploadedFilesDir); + + privilegeHelpers.dropRootPrivileges(); + + tzupdate.start(); + + log.info('Service', 'All services started'); + appBuilder.setReady(); + }) + ) + ) ); */ - .then(() => - startHTTPServer(AppType.TRUSTED, 'trusted', trustedPort, () => - startHTTPServer(AppType.SANDBOXED, 'sandbox', sandboxPort, () => - startHTTPServer(AppType.PUBLIC, 'public', publicPort, async () => { - - await privilegeHelpers.ensureMailtrainDir(uploadedFilesDir); - - privilegeHelpers.dropRootPrivileges(); - - tzupdate.start(); - - log.info('Service', 'All services started'); - appBuilder.setReady(); - }) - ) - ) - ); -/* .then(() => executor.spawn(() => testServer(() =>