Let the box code initialize the infrastructure

This is done because:
1. The box code can install certs for addons (like mail addon) when
   required.

2. The box code initialize/teardown addons on demand. This is not planned
   currently.
This commit is contained in:
Girish Ramakrishnan
2016-05-04 15:08:11 -07:00
parent 920626192c
commit b4c15b1719
8 changed files with 19 additions and 8 deletions
+3 -1
View File
@@ -5,7 +5,8 @@ exports = module.exports = {
stop: stop
};
var assert = require('assert'),
var addons = require('./addons.js'),
assert = require('assert'),
async = require('async'),
auth = require('./auth.js'),
certificates = require('./certificates.js'),
@@ -258,6 +259,7 @@ function start(callback) {
database.initialize,
cloudron.initialize, // keep this here because it reads activation state that others depend on
certificates.installAdminCertificate, // keep this before cron to block heartbeats until cert is ready
addons.initialize,
taskmanager.initialize,
mailer.initialize,
cron.initialize,