mirror of
https://github.com/ShaYmez/ezservermonitor-web.git
synced 2026-06-01 21:45:03 -04:00
Fix for RedHat/CentOS.
This commit is contained in:
+5
-2
@@ -7,9 +7,12 @@ $hostname = php_uname('n');
|
||||
// OS
|
||||
if (!($os = shell_exec('/usr/bin/lsb_release -ds')))
|
||||
{
|
||||
if (!($os = shell_exec('find /etc/*-release -type f -exec cat {} \; | grep NAME | tail -n 1 | cut -d= -f2 | tr -d \'"\'')))
|
||||
if(!($os = shell_exec('cat /etc/system-release')))
|
||||
{
|
||||
$os = 'N.A';
|
||||
if (!($os = shell_exec('find /etc/*-release -type f -exec cat {} \; | grep NAME | tail -n 1 | cut -d= -f2 | tr -d \'"\'')))
|
||||
{
|
||||
$os = 'N.A';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user