mirror of
https://github.com/ShaYmez/ezservermonitor-web.git
synced 2024-12-18 23:55:53 -05:00
Merge pull request #8 from Wohlraj/distro_name
Fix distro name for some more platforms (e.g. Raspbian).
This commit is contained in:
commit
e78dc167c2
@ -7,20 +7,11 @@ $hostname = php_uname('n');
|
||||
// OS
|
||||
if (!($os = shell_exec('/usr/bin/lsb_release -ds')))
|
||||
{
|
||||
if (!($os = shell_exec('cat /etc/fedora-release')))
|
||||
if(!($os = shell_exec('cat /etc/system-release')))
|
||||
{
|
||||
if (!($os = shell_exec('cat /etc/redhat-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('cat /etc/mandriva-release')))
|
||||
{
|
||||
if (!($os = shell_exec('cat /etc/SuSE-release')))
|
||||
{
|
||||
if (!($os = shell_exec('cat /etc/centos-release')))
|
||||
{
|
||||
$os = 'N.A';
|
||||
}
|
||||
}
|
||||
}
|
||||
$os = 'N.A';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user