mirror of
https://github.com/ShaYmez/ezservermonitor-web.git
synced 2024-09-27 15:36:34 -04:00
Fix for RedHat/CentOS.
This commit is contained in:
parent
b28e0b0275
commit
7e44ecbd47
@ -6,12 +6,15 @@ $hostname = php_uname('n');
|
|||||||
|
|
||||||
// OS
|
// OS
|
||||||
if (!($os = shell_exec('/usr/bin/lsb_release -ds')))
|
if (!($os = shell_exec('/usr/bin/lsb_release -ds')))
|
||||||
|
{
|
||||||
|
if(!($os = shell_exec('cat /etc/system-release')))
|
||||||
{
|
{
|
||||||
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('find /etc/*-release -type f -exec cat {} \; | grep NAME | tail -n 1 | cut -d= -f2 | tr -d \'"\'')))
|
||||||
{
|
{
|
||||||
$os = 'N.A';
|
$os = 'N.A';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Kernel
|
// Kernel
|
||||||
if (!($kernel = shell_exec('/bin/uname -r')))
|
if (!($kernel = shell_exec('/bin/uname -r')))
|
||||||
|
Loading…
Reference in New Issue
Block a user