mirror of
				https://github.com/ShaYmez/ezservermonitor-web.git
				synced 2025-11-03 21:40:35 -05:00 
			
		
		
		
	System : better OS name detection
This commit is contained in:
		
							parent
							
								
									4952f02a7a
								
							
						
					
					
						commit
						b6d98b7f12
					
				@ -8,11 +8,14 @@ $hostname = php_uname('n');
 | 
				
			|||||||
// OS
 | 
					// OS
 | 
				
			||||||
if (!($os = shell_exec('/usr/bin/lsb_release -ds | cut -d= -f2 | tr -d \'"\'')))
 | 
					if (!($os = shell_exec('/usr/bin/lsb_release -ds | cut -d= -f2 | tr -d \'"\'')))
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if(!($os = shell_exec('cat /etc/system-release | cut -d= -f2 | tr -d \'"\''))) 
 | 
					    if (!($os = shell_exec('cat /etc/system-release | cut -d= -f2 | tr -d \'"\'')))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if (!($os = shell_exec('find /etc/*-release -type f -exec cat {} \; | grep PRETTY_NAME | tail -n 1 | cut -d= -f2 | tr -d \'"\'')))
 | 
					        if (!($os = shell_exec('cat /etc/os-release | grep PRETTY_NAME | tail -n 1 | cut -d= -f2 | tr -d \'"\'')))
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            $os = 'N.A';
 | 
					            if (!($os = shell_exec('find /etc/*-release -type f -exec cat {} \; | grep PRETTY_NAME | tail -n 1 | cut -d= -f2 | tr -d \'"\'')))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                $os = 'N.A';
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user