Fix #1130 Reload settings on /admin/settings server restart
This commit is contained in:
parent
e702a86c9f
commit
d26f5d64f7
1 changed files with 2 additions and 0 deletions
|
@ -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 () {});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue