mirror of
				https://github.com/MichMich/MagicMirror.git
				synced 2025-10-31 02:36:47 +00:00 
			
		
		
		
	[updatenotification] Fix pm2 using detection when pm2 script is inside or outside MagicMirror root folder (#3605)
This will fix #3576 @FrankBlackMG: I don't use `*env.unique_id` because some others modules can use pm2 too for starting a service and unique_id is the same (this will make confusion) So I check `name` and `pm_id` for found it
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							c96326b760
						
					
				
				
					commit
					399e2ae1da
				
			| @@ -187,7 +187,9 @@ class Updater { | ||||
| 						return; | ||||
| 					} | ||||
| 					list.forEach((pm) => { | ||||
| 						if (pm.pm2_env.version === this.version && pm.pm2_env.status === "online" && pm.pm2_env.pm_cwd.includes(`${this.root_path}`)) { | ||||
| 						Log.debug(`[PM2] pm2 name: ${pm.name} -- in process env: ${process.env.name}`) | ||||
| 						Log.debug(`[PM2] pm2 pm_id: ${pm.pm_id} -- in process env: ${process.env.pm_id}`) | ||||
| 						if (pm.pm2_env.status === "online" && process.env.name === pm.name && +process.env.pm_id === +pm.pm_id) { | ||||
| 							this.PM2 = pm.name; | ||||
| 							this.usePM2 = true; | ||||
| 							Log.info("updatenotification: [PM2] You are using pm2 with", this.PM2); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user