1
0

feat: 合并代码

This commit is contained in:
TsMask
2023-10-27 09:40:53 +08:00
parent 08a908c3f4
commit 955aba902b
26 changed files with 1057 additions and 53 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))