fix: omc restart issue

This commit is contained in:
2024-04-16 20:06:11 +08:00
parent 4cec3571f7
commit edd0102b83

View File

@@ -860,7 +860,8 @@ func PostNeServiceAction(w http.ResponseWriter, r *http.Request) {
case "omc":
// send 204 to fe firstly
services.ResponseStatusOK204NoContent(w)
actionCmd := fmt.Sprintf("sudo %s/bin/omcsvc.sh %s", config.GetYamlConfig().NE.OmcDir, action)
//actionCmd := fmt.Sprintf("sudo %s/bin/omcsvc.sh %s", config.GetYamlConfig().NE.OmcDir, action)
actionCmd := fmt.Sprintf("sudo systemctl %s restagent", action)
go RunSSHCmd(sshHost, actionCmd)
return
// cmd := exec.Command("ssh", sshHost, actionCmd)