feat(Admin Dashboard): add crond & sendmail service status and related documentation

This commit is contained in:
cubic
2022-03-16 11:31:38 +08:00
parent 545ede66c6
commit 506c6c5bc2
3 changed files with 49 additions and 1 deletions

View File

@@ -421,6 +421,8 @@ class Admin extends Base
'nginx' => FALSE,
'php' => FALSE,
'codefever' => FALSE,
'crond' => FALSE,
'sendmail' => FALSE
];
$output = [];
@@ -444,6 +446,20 @@ class Admin extends Base
}
}
$output = [];
if (Command::run(['ps uax | grep "crond" | grep -v "grep" | wc -l'], $output)) {
if ($output[0] > 0) {
$service['crond'] = TRUE;
}
}
$output = [];
if (Command::run(['ps uax | grep "sendmail" | grep -v "grep" | wc -l'], $output)) {
if ($output[0] > 0) {
$service['sendmail'] = TRUE;
}
}
Response::output([
'usage' => $usage,
'vm' => $vm,