This commit is contained in:
2021-03-29 12:13:53 +08:00
parent bbe6e27a26
commit a072a3f3fc
+5 -3
View File
@@ -97,9 +97,11 @@ class Shutdown extends Component
if (intval($content) < 1) {
return false;
}
exec('ps -eo pid', $this->_pids);
var_dump($this->_pids);
if (in_array($content, $this->_pids)) {
exec('ps -eo pid', $output);
$output = array_filter($output, function ($value) {
return intval($value);
});
if (in_array(intval($content), $output)) {
return false;
}
return true;