fix: dpkg software issue
This commit is contained in:
@@ -710,11 +710,15 @@ func ActiveSoftwareToNF(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
var inputStr string = "n"
|
||||
var timeout int = 180
|
||||
if config.GetYamlConfig().NE.DpkgOverwrite {
|
||||
inputStr = "y"
|
||||
}
|
||||
dpkgCmd := fmt.Sprintf("sudo %s/spawndpkg.sh %s '%s'",
|
||||
config.GetYamlConfig().NE.ScpDir, inputStr, filePath)
|
||||
if config.GetYamlConfig().NE.DpkgTimeout != 0 {
|
||||
timeout = config.GetYamlConfig().NE.DpkgTimeout
|
||||
}
|
||||
dpkgCmd := fmt.Sprintf("sudo %s/spawndpkg.sh %d %s '%s'",
|
||||
config.GetYamlConfig().NE.ScpDir, timeout, inputStr, filePath)
|
||||
err = RunSSHCmd(sshHost, dpkgCmd)
|
||||
if err != nil {
|
||||
log.Errorf("Faile to execute dpkg command: %s, error: %v", dpkgCmd, err)
|
||||
|
||||
Reference in New Issue
Block a user