Skip to content

Commit

Permalink
improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc committed Jan 25, 2017
1 parent 99e0601 commit adb805e
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions core/class/jeedom.class.php
Expand Up @@ -101,26 +101,18 @@ public static function health() {
'comment' => ($state) ? '' : __('Si vous êtes en version 5.4.x on vous indiquera quand la version 5.5 sera obligatoire', __FILE__),
);

$uname = shell_exec('uname -a');
$version = '';
$state = true;
if (strpos(strtolower($uname), 'debian') === false) {
$state = false;
}
if (!file_exists('/etc/debian_version')) {
$version = '';
if (system::getDistrib() != 'debian') {
$state = false;
} else {
$state = true;
$version = trim(strtolower(file_get_contents('/etc/debian_version')));
if (version_compare($version, '8', '<')) {
if (strpos($version, 'jessie') === false && strpos($version, 'stretch')) {
$state = false;
}
}
}
if (strpos(strtolower($uname), 'ubuntu') !== false) {
$state = false;
}
$return[] = array(
'name' => __('Version OS', __FILE__),
'state' => $state,
Expand Down

0 comments on commit adb805e

Please sign in to comment.