add debugs

This commit is contained in:
Girish Ramakrishnan
2016-04-05 12:07:37 -07:00
parent 21e8bc1ce5
commit 7136de4d08
+3
View File
@@ -131,10 +131,13 @@ function initialize(callback) {
isActivated(function (error, activated) {
if (error) return callback(error);
debug('initialize: cloudron %s activated', activated ? '' : 'not');
if (activated) fs.writeFileSync(paths.FIRST_RUN_FILE, 'been there, done that', 'utf8');
if (!fs.existsSync(paths.FIRST_RUN_FILE)) {
// EE API is sync. do not keep the server waiting
debug('initialize: emitting first run event');
process.nextTick(function () { exports.events.emit(exports.EVENT_FIRST_RUN); });
fs.writeFileSync(paths.FIRST_RUN_FILE, 'been there, done that', 'utf8');
}