summaryrefslogtreecommitdiff
path: root/src/node/hooks/express
diff options
context:
space:
mode:
authorjohnyma22 <john@mclear.co.uk>2012-11-02 15:21:12 +0000
committerjohnyma22 <john@mclear.co.uk>2012-11-02 15:21:12 +0000
commit2f123970e646e012a0be58387b963f79cdf977a0 (patch)
treef9bd4bfb0d45869f6061a0acf459eda427f3307e /src/node/hooks/express
parent1d055f2cd498b3f22a98e02871a82d1950f71369 (diff)
downloadetherpad-lite-2f123970e646e012a0be58387b963f79cdf977a0.zip
Make express restart - I think this reloads settings
Diffstat (limited to 'src/node/hooks/express')
-rw-r--r--src/node/hooks/express/adminsettings.js18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/node/hooks/express/adminsettings.js b/src/node/hooks/express/adminsettings.js
index 2a6b590d..db4df750 100644
--- a/src/node/hooks/express/adminsettings.js
+++ b/src/node/hooks/express/adminsettings.js
@@ -1,6 +1,7 @@
var path = require('path');
var eejs = require('ep_etherpad-lite/node/eejs');
var installer = require('ep_etherpad-lite/static/js/pluginfw/installer');
+var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks");
var fs = require('fs');
exports.expressCreateServer = function (hook_name, args, cb) {
@@ -41,20 +42,11 @@ exports.socketio = function (hook_name, args, cb) {
});
});
-/*
- socket.on("install", function (plugin_name) {
- socket.emit("progress", {progress:0, message:'Downloading and installing ' + plugin_name + "..."});
- installer.install(plugin_name, function (progress) {
- socket.emit("progress", progress);
- });
- });
+ socket.on("restartServer", function () {
+ console.log("Admin request to restart server through a socket on /admin/settings");
+ hooks.aCallAll("restartServer", {}, function () {});
- socket.on("uninstall", function (plugin_name) {
- socket.emit("progress", {progress:0, message:'Uninstalling ' + plugin_name + "..."});
- installer.uninstall(plugin_name, function (progress) {
- socket.emit("progress", progress);
- });
});
-*/
+
});
}