mirror of
https://github.com/PGYER/codefever.git
synced 2026-05-06 21:50:39 +08:00
feat(Admin Dashboard): add crond & sendmail service status and related documentation
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user