mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
/admin/settings: Reload plugins, call loadSettings
hook on restart
This should match the normal startup procedure a bit more closely.
This commit is contained in:
parent
3ff244f7a0
commit
ed93ef5636
1 changed files with 3 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
||||||
const eejs = require('../../eejs');
|
const eejs = require('../../eejs');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const hooks = require('../../../static/js/pluginfw/hooks');
|
const hooks = require('../../../static/js/pluginfw/hooks');
|
||||||
|
const plugins = require('../../../static/js/pluginfw/plugins');
|
||||||
const settings = require('../../utils/Settings');
|
const settings = require('../../utils/Settings');
|
||||||
|
|
||||||
exports.expressCreateServer = (hookName, args, cb) => {
|
exports.expressCreateServer = (hookName, args, cb) => {
|
||||||
|
@ -47,6 +48,8 @@ exports.socketio = (hookName, args, cb) => {
|
||||||
socket.on('restartServer', async () => {
|
socket.on('restartServer', async () => {
|
||||||
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();
|
settings.reloadSettings();
|
||||||
|
await plugins.update();
|
||||||
|
await hooks.aCallAll('loadSettings', {settings});
|
||||||
await hooks.aCallAll('restartServer');
|
await hooks.aCallAll('restartServer');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue