fix: ims etc backup list

This commit is contained in:
2023-10-26 16:25:02 +08:00
parent fab2c9f90d
commit 4a651caac0
4 changed files with 24 additions and 5 deletions

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))