From 9ec93868542b97e8b6fb23b5e35fa21ea8607e2e Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期五, 20 十二月 2019 14:42:29 +0800 Subject: [PATCH] update updatePatch.sh --- updatePatch.sh | 9 ++++++++- service/SysService.go | 5 ++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/service/SysService.go b/service/SysService.go index 14c3084..4e57f6b 100644 --- a/service/SysService.go +++ b/service/SysService.go @@ -249,9 +249,8 @@ updateCmd = fmt.Sprintf("%supgrade.sh %s %s %s &",unZipPath,unZipPath,zipFilePath,configPatchPath+"/"+identifier) } //2.鏇存柊绯荤粺 - var cmd *exec.Cmd - cmd = exec.Command("/bin/sh","-c", updateCmd) - if b, err := cmd.Output(); err != nil { + b,err := ExecCmd(updateCmd) + if err != nil { logger.Debug("upgrade err:",err,"result:",string(b),"cmd:",updateCmd) return false } else { diff --git a/updatePatch.sh b/updatePatch.sh index 099f40d..eb490a6 100755 --- a/updatePatch.sh +++ b/updatePatch.sh @@ -44,6 +44,13 @@ if [ "$item" = "sdkCompare" ]; then startSdkCompareWithOneParam -e=pro echo "update ${item} success">>upgrade.out + else if [ "$item" = "ruleprocess" ]; then + echo "update algorithm">>upgrade.out + #update algorithm + if [ -d $patchPath/algorithm ]; then + cp -r $patchPath/algorithm /opt/vasystem/bin + fi + nohup ./ruleprocess >/dev/null 2>&1 & else nohup ./$item >/dev/null 2>&1 & echo "update ${item} success">>upgrade.out @@ -52,7 +59,7 @@ if [ "$item" = "dist" ]; then echo "update web dist">>upgrade.out cp -r $patchPath/$item /opt/vasystem/web/dist - else + else echo "unknown directory ${item}">>upgrade.out fi fi -- Gitblit v1.8.0