From c82458e612a6ef1cdb4e789392ed489f5ea646c9 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期三, 18 十二月 2019 18:00:47 +0800
Subject: [PATCH] add rm patch zip
---
updatePatch.sh | 3 +++
service/SysService.go | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/service/SysService.go b/service/SysService.go
index 813fc3d..809693f 100644
--- a/service/SysService.go
+++ b/service/SysService.go
@@ -179,7 +179,7 @@
}
//2.鏇存柊绯荤粺
var cmd *exec.Cmd
- updateCmd := fmt.Sprintf("setsid ./updatePatch.sh %s",unZipPath)
+ updateCmd := fmt.Sprintf("setsid ./updatePatch.sh %s %s %s",unZipPath,configPatchPath+"/"+identifier+ext,configPatchPath+"/"+identifier)
cmd = exec.Command("/bin/sh","-c", updateCmd)
logger.Debug("called sh updatePatch.sh,updateCmd:",updateCmd)
if b, err := cmd.Output(); err != nil {
diff --git a/updatePatch.sh b/updatePatch.sh
index 081bc83..614272d 100755
--- a/updatePatch.sh
+++ b/updatePatch.sh
@@ -27,6 +27,8 @@
}
cd /opt/vasystem/bin
patchPath=$1
+zipPath=$2
+chunkPath=$3
files=$(ls $patchPath)
echo "patchPath: " $patchPath
if [ ! -d $patchPath ]; then
@@ -59,3 +61,4 @@
sleep 3
echo "patch update success"
fi
+rm -rf $patchPath $zipPath $chunkPath
\ No newline at end of file
--
Gitblit v1.8.0