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

feat: add server restart option to home page restart button (#1324)

* Initial plan

* feat: add server restart functionality to home page restart button

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* refactor: remove unreachable success callback for server restart

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>
This commit is contained in:
Copilot
2026-02-03 00:45:52 +08:00
committed by GitHub
parent 54b1ddb809
commit d7e8301148
8 changed files with 110 additions and 8 deletions

View File

@@ -88,6 +88,11 @@ func RestartPanel() {
_ = shell.ExecfAsync("sleep 1 && systemctl restart acepanel")
}
// RestartServer 重启服务器
func RestartServer() {
_ = shell.ExecfAsync("sleep 1 && reboot")
}
// IsChina 是否中国大陆
func IsChina() bool {
client := resty.New()