This commit is contained in:
simonzhangsz committed 2023-09-18 16:22:11 +08:00
1 parent 98fcdff349
commit e74b2f9b8a
2 files changed
+16 -6

No files matched your search

+1 -5
View File
@@ -674,11 +674,7 @@ func ActiveSoftwareToNF(w http.ResponseWriter, r *http.Request) {
if !config.GetYamlConfig().OMC.TestMode {
filePath := (*neVersion)[0]["file_path"]
sshHost := fmt.Sprintf("%s@%s", config.GetYamlConfig().NE.User, neInfo.Ip)
fileType, err := global.IsRpmOrDebPackage(filePath)
if err != nil {
log.Error("Failed to JudgeRpmOrDebPackage:", err)
services.ResponseInternalServerError500ProcessError(w, err)
}
fileType := global.IsRpmOrDebPackage(filePath)
if fileType == 1 {
rpmCmd := fmt.Sprintf("sudo rpm -Uvh '%s'", filePath)
cmd := exec.Command("ssh", sshHost, rpmCmd)