added restart button to ACP (!!)

This commit is contained in:
Julian Lam
2014-02-22 03:11:13 -05:00
parent b64e5870b7
commit 7760a6b207
4 changed files with 19 additions and 0 deletions

View File

@@ -336,4 +336,12 @@ var fs = require('fs'),
db.getFileName(callback);
}
};
Meta.restart = function() {
if (process.send) {
process.send('nodebb:restart');
} else {
winston.error('[meta.restart] Could not restart, are you sure NodeBB was started with `./nodebb start`?');
}
};
}(exports));

View File

@@ -31,6 +31,10 @@ SocketAdmin.before = function(socket, next) {
});
};
SocketAdmin.restart = function(socket, data, callback) {
meta.restart();
};
/* Topics */
SocketAdmin.topics = {};