diff --git a/src/modules/nms_cxy/controller/system.go b/src/modules/nms_cxy/controller/system.go index 1405390..1073d03 100644 --- a/src/modules/nms_cxy/controller/system.go +++ b/src/modules/nms_cxy/controller/system.go @@ -241,15 +241,13 @@ func (s *SystemController) RebootApp(c *gin.Context) { return } - _, err := cmd.ExecWithCheck("nohup", "sh", "-c", "sleep 2s && service omc restart", "> /dev/null 2>&1 &\n") - if err != nil { - c.JSON(200, map[string]any{ - "requestId": body.RequestId, - "status": "fail", - "additionalInfo": fmt.Sprintf("NE service reboot error %s", err.Error()), - }) - return - } + go func() { + _, err := cmd.ExecWithCheck("nohup", "sh", "-c", "sleep 2s && service omc restart", "> /dev/null 2>&1 &\n") + if err != nil { + fmt.Println(fmt.Sprintf("NE service reboot error %s", err.Error())) + return + } + }() c.JSON(200, map[string]any{ "requestId": body.RequestId,