2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 14:57:16 +08:00

feat: supervisor plugin and optimize code

This commit is contained in:
耗子
2023-07-26 02:14:26 +08:00
parent b4720a1c84
commit 65a46796ea
11 changed files with 1063 additions and 6 deletions

View File

@@ -35,8 +35,7 @@ func (c *Php80Controller) Status(ctx http.Context) {
return
}
out := tools.ExecShell("systemctl status php-fpm-" + c.version + " | grep Active | grep -v grep | awk '{print $2}'")
status := strings.TrimSpace(out)
status := tools.ExecShell("systemctl status php-fpm-" + c.version + " | grep Active | grep -v grep | awk '{print $2}'")
if len(status) == 0 {
controllers.Error(ctx, http.StatusInternalServerError, "获取PHP-"+c.version+"运行状态失败")
return