From ed93ef5636b0ed2915b331cb2530120f298c2f6d Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 15 Feb 2021 01:23:02 -0500 Subject: [PATCH] /admin/settings: Reload plugins, call `loadSettings` hook on restart This should match the normal startup procedure a bit more closely. --- src/node/hooks/express/adminsettings.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/node/hooks/express/adminsettings.js b/src/node/hooks/express/adminsettings.js index 139cce1b1..8cbf3762a 100644 --- a/src/node/hooks/express/adminsettings.js +++ b/src/node/hooks/express/adminsettings.js @@ -3,6 +3,7 @@ const eejs = require('../../eejs'); const fs = require('fs'); const hooks = require('../../../static/js/pluginfw/hooks'); +const plugins = require('../../../static/js/pluginfw/plugins'); const settings = require('../../utils/Settings'); exports.expressCreateServer = (hookName, args, cb) => { @@ -47,6 +48,8 @@ exports.socketio = (hookName, args, cb) => { socket.on('restartServer', async () => { console.log('Admin request to restart server through a socket on /admin/settings'); settings.reloadSettings(); + await plugins.update(); + await hooks.aCallAll('loadSettings', {settings}); await hooks.aCallAll('restartServer'); }); });