mirror of
https://github.com/PGYER/codefever.git
synced 2026-06-08 07:02:51 +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,
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
### 系统服务状态及维护
|
||||
|
||||
`CodeFever` 有三个主要的系统服务, 分别是 `PHP` , `Nginx` 和 `CodeFever` 。如果某个服务异常需要手动重新启动。
|
||||
`CodeFever` 有五个主要的系统服务, 分别是 `PHP` , `Nginx` , `CodeFever` , `Crond` 和 `Sendmail` 。如果某个服务异常需要手动重新启动。
|
||||
|
||||
具体服务启动方式如下:
|
||||
|
||||
@@ -77,3 +77,29 @@ service codefever stop # 停止
|
||||
service codefever restart # 重新启动
|
||||
service codefever status # 查看状态
|
||||
```
|
||||
|
||||
#### Crond
|
||||
|
||||
说明: 基础服务, 用于 `CodeFever` 的定时任务时钟事件源
|
||||
|
||||
支持的维护命令:
|
||||
|
||||
```shell
|
||||
service conrd start # 启动
|
||||
service codefever stop # 停止
|
||||
service codefever restart # 重新启动
|
||||
service codefever status # 查看状态
|
||||
```
|
||||
|
||||
#### Sendmail
|
||||
|
||||
说明: 基础服务, 用于 `CodeFever` 的邮件发送队列管理和代理
|
||||
|
||||
支持的维护命令:
|
||||
|
||||
```shell
|
||||
service sendmail start # 启动
|
||||
service sendmail stop # 停止
|
||||
service sendmail restart # 重新启动
|
||||
service sendmail status # 查看状态
|
||||
```
|
||||
|
||||
@@ -110,6 +110,12 @@ class Dashboard extends React.Component {
|
||||
<Grid item sm={6} md={3}>
|
||||
<NumbericDashboard title='PHP-FPM' paletteName='fromValue' icon={psNewFeature} numbericValue={pending ? null : this.state.data.service.php ? 'Running' : 'Stopped'} />
|
||||
</Grid>
|
||||
<Grid item sm={6} md={3}>
|
||||
<NumbericDashboard title='Crond' paletteName='fromValue' icon={psNewFeature} numbericValue={pending ? null : this.state.data.service.crond ? 'Running' : 'Stopped'} />
|
||||
</Grid>
|
||||
<Grid item sm={6} md={3}>
|
||||
<NumbericDashboard title='SendMail' paletteName='fromValue' icon={psNewFeature} numbericValue={pending ? null : this.state.data.service.sendmail ? 'Running' : 'Stopped'} />
|
||||
</Grid>
|
||||
</Grid>)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user