fix: ims etc backup list

This commit is contained in:
simonzhangsz committed 2023-10-26 16:25:02 +08:00
1 parent fab2c9f90d
commit 4a651caac0
4 files changed
+24 -5

No files matched your search

+2 -3
View File
@@ -698,7 +698,7 @@ func ActiveSoftwareToNF(w http.ResponseWriter, r *http.Request) {
return
}
} else if fileType == 2 {
dpkgCmd := fmt.Sprintf("sudo dpkg -i '%s'", filePath)
dpkgCmd := fmt.Sprintf("sudo dpkg -i --force-all '%s'", filePath)
cmd := exec.Command("ssh", sshHost, dpkgCmd)
out, err := cmd.CombinedOutput()
log.Debugf("Exec output: %v", string(out))
@@ -744,7 +744,6 @@ func ActiveSoftwareToNF(w http.ResponseWriter, r *http.Request) {
services.ResponseInternalServerError500ProcessError(w, err)
return
}
}
}
@@ -839,7 +838,7 @@ func RollBackSoftwareToNF(w http.ResponseWriter, r *http.Request) {
return
}
} else if fileType == 2 {
dpkgCmd := fmt.Sprintf("sudo dpkg -i '%s'", filePath)
dpkgCmd := fmt.Sprintf("sudo dpkg -i --force-all '%s'", filePath)
cmd := exec.Command("ssh", sshHost, dpkgCmd)
out, err := cmd.CombinedOutput()
log.Debugf("Exec output: %v", string(out))