Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
zoic21 committed Aug 13, 2024
1 parent b154f4f commit d1a1897
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions core/class/philipsHue.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ public static function deamon_info() {
$return['state'] = 'nok';
$pid_file = jeedom::getTmpFolder('philipsHue') . '/deamon.pid';
if (file_exists($pid_file)) {
if (@posix_getsid((int) trim(file_get_contents($pid_file)))) {
if (trim(file_get_contents($pid_file)) === '') {
shell_exec(system::getCmdSudo() . 'rm -rf ' . $pid_file . ' 2>&1 > /dev/null');
}else if (@posix_getsid((int) trim(file_get_contents($pid_file)))) {
$return['state'] = 'ok';
} else {
if (trim(file_get_contents($pid_file)) != '') {
shell_exec(system::getCmdSudo() . 'rm -rf ' . $pid_file . ' 2>&1 > /dev/null');
}
}
}
$return['launchable'] = 'ok';
Expand Down

0 comments on commit d1a1897

Please sign in to comment.