fix: dkpg ims issue

This commit is contained in:
2024-01-16 19:11:31 +08:00
parent ca21e901fd
commit 3cbea84201

View File

@@ -710,8 +710,12 @@ func ActiveSoftwareToNF(w http.ResponseWriter, r *http.Request) {
services.ResponseInternalServerError500ProcessError(w, err)
return
}
dpkgCmd := fmt.Sprintf("sudo %s/spawdpkg.sh -i --force-all '%s'",
config.GetYamlConfig().NE.ScpDir, filePath)
var inputStr string = "n"
if config.GetYamlConfig().NE.DpkgOverwrite {
inputStr = "y"
}
dpkgCmd := fmt.Sprintf("sudo %s/spawdpkg.sh %s '%s'",
config.GetYamlConfig().NE.ScpDir, inputStr, filePath)
err = RunSSHCmd(sshHost, dpkgCmd)
if err != nil {
log.Error("Faile to execute dpkg command:", err)