This commit is contained in:
simonzhangsz committed 2023-09-18 16:36:05 +08:00
1 parent e74b2f9b8a
commit 3d27ba8dac
1 file changed
+1 -5
+1 -5
View File
@@ -782,11 +782,7 @@ func RollBackSoftwareToNF(w http.ResponseWriter, r *http.Request) {
if !config.GetYamlConfig().OMC.TestMode {
sshHost := fmt.Sprintf("%s@%s", config.GetYamlConfig().NE.User, neInfo.Ip)
fileType, err := global.JudgeRpmOrDebPackage(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 --oldpackage '%s'", filePath)
cmd := exec.Command("ssh", sshHost, rpmCmd)