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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user