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

refactor: 重构systemctl包

This commit is contained in:
耗子
2024-06-23 00:48:37 +08:00
parent 11d6b40dce
commit 6bd07251fc
21 changed files with 104 additions and 85 deletions

View File

@@ -11,6 +11,7 @@ import (
"github.com/TheTNB/panel/app/http/controllers"
"github.com/TheTNB/panel/pkg/shell"
"github.com/TheTNB/panel/pkg/systemctl"
"github.com/TheTNB/panel/pkg/tools"
)
@@ -86,7 +87,7 @@ func (r *PhpMyAdminController) SetPort(ctx http.Context) http.Response {
}
}
if err := tools.ServiceReload("openresty"); err != nil {
if err := systemctl.Reload("openresty"); err != nil {
return controllers.Error(ctx, http.StatusInternalServerError, "重载OpenResty失败")
}