From af06d0f9a3cebb865ce9bad05018dc9ab8b5c6f6 Mon Sep 17 00:00:00 2001 From: simonzhangsz Date: Wed, 11 Oct 2023 10:47:27 +0800 Subject: [PATCH] license --- features/cm/license.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/cm/license.go b/features/cm/license.go index 15edc728..8b8fbc21 100644 --- a/features/cm/license.go +++ b/features/cm/license.go @@ -269,7 +269,7 @@ func UploadLicenseFileData(w http.ResponseWriter, r *http.Request) { // replace system.ini neFilePath := config.GetYamlConfig().NE.ScpDir + "/" + licenseFileName - cpCmd = fmt.Sprintf("sudo cp -f %s %s/system.ini", neFilePath, neLicensePath) + cpCmd = fmt.Sprintf("sudo cp -f %s %s/system.ini && sudo rm -rf %s", neFilePath, neLicensePath, neFilePath) cmd = exec.Command("ssh", sshHost, cpCmd) out, err = cmd.CombinedOutput() log.Debugf("Exec output: %v", string(out))