Fix #1130 Reload settings on /admin/settings server restart

This commit is contained in:
Marcel Klehr 2012-11-06 17:35:52 +01:00
parent e702a86c9f
commit d26f5d64f7

View file

@ -1,5 +1,6 @@
var path = require('path'); var path = require('path');
var eejs = require('ep_etherpad-lite/node/eejs'); var eejs = require('ep_etherpad-lite/node/eejs');
var settings = require('ep_etherpad-lite/node/utils/Settings');
var installer = require('ep_etherpad-lite/static/js/pluginfw/installer'); var installer = require('ep_etherpad-lite/static/js/pluginfw/installer');
var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks"); var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks");
var fs = require('fs'); var fs = require('fs');
@ -44,6 +45,7 @@ exports.socketio = function (hook_name, args, cb) {
socket.on("restartServer", function () { socket.on("restartServer", function () {
console.log("Admin request to restart server through a socket on /admin/settings"); console.log("Admin request to restart server through a socket on /admin/settings");
settings.reloadSettings();
hooks.aCallAll("restartServer", {}, function () {}); hooks.aCallAll("restartServer", {}, function () {});
}); });