liuxiaolong
2019-12-18 c82458e612a6ef1cdb4e789392ed489f5ea646c9
add rm patch zip
2个文件已修改
5 ■■■■ 已修改文件
service/SysService.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
updatePatch.sh 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 {
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