mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Add call to onWebUIStartupEnd when pluginHandler is refreshed, so new plugins can run their startups, if they have one.
Add plugins option (disabled) to the sample config
This commit is contained in:
		
							parent
							
								
									fdd56b2dc5
								
							
						
					
					
						commit
						7ca65028d8
					
				
					 2 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -130,7 +130,7 @@ module.exports.pluginHandler = function (parent) {
 | 
			
		|||
    obj.refreshJS = function (req, res) {
 | 
			
		||||
        // to minimize server reboots when installing new plugins, we call the new data and overwrite the old pluginHandler on the front end
 | 
			
		||||
        res.set('Content-Type', 'text/javascript');
 | 
			
		||||
        res.send('pluginHandlerBuilder = ' + obj.prepExports() + ' pluginHandler = new pluginHandlerBuilder();');
 | 
			
		||||
        res.send('pluginHandlerBuilder = ' + obj.prepExports() + ' pluginHandler = new pluginHandlerBuilder(); pluginHandler.callHook("onWebUIStartupEnd");');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    obj.callHook = function (hookName, ...args) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -64,7 +64,10 @@
 | 
			
		|||
      "meshcommander": "https://www.meshcommander.com/"
 | 
			
		||||
    },
 | 
			
		||||
    "__MaxInvalidLogin": "Time in minutes, max amount of bad logins from a source IP in the time before logins are rejected.",
 | 
			
		||||
    "MaxInvalidLogin": { "time": 10, "count": 10, "coolofftime": 10 }
 | 
			
		||||
    "MaxInvalidLogin": { "time": 10, "count": 10, "coolofftime": 10 },
 | 
			
		||||
    "_plugins": {
 | 
			
		||||
        "enabled": true
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "_domains": {
 | 
			
		||||
    "": {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue