fix: license issue
This commit is contained in:
@@ -273,13 +273,13 @@ func UploadLicenseFileData(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
// backup system.ini to system.ini.bak
|
||||
sshHost := fmt.Sprintf("%s@%s", config.GetYamlConfig().NE.User, neInfo.Ip)
|
||||
cpCmd := fmt.Sprintf("sudo test -f %s/system.ini && cp -f %s/system.ini %s/system.ini.bak",
|
||||
cpCmd := fmt.Sprintf("sudo test -f %s/system.ini && cp -f %s/system.ini %s/system.ini.bak||echo 0",
|
||||
neLicensePath, neLicensePath, neLicensePath)
|
||||
cmd = exec.Command("ssh", sshHost, cpCmd)
|
||||
out, err = cmd.CombinedOutput()
|
||||
log.Debugf("Exec output: %v", string(out))
|
||||
if err != nil {
|
||||
log.Error("Faile to execute cp command:", err)
|
||||
log.Errorf("Faile to execute cp command:%v, cmd:%s", err, cpCmd)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user