From 662fdfec9c391b13b9af9b67009e44d394bc97c9 Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期六, 30 五月 2020 17:32:54 +0800 Subject: [PATCH] fix UnTarGzByCmd --- service/SdkInstall.go | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/service/SdkInstall.go b/service/SdkInstall.go index da65aa3..e759454 100644 --- a/service/SdkInstall.go +++ b/service/SdkInstall.go @@ -1,7 +1,7 @@ package service import ( - "basic.com/dbapi.git" + //"basic.com/dbapi.git" "basic.com/valib/logger.git" "encoding/json" "errors" @@ -68,7 +68,8 @@ } unPackFilePath := configPatchPath+"/"+identifier+ext - err := util.UnTarGz(unPackFilePath, unPackPath) + logger.Debug("unPackFilePath:", unPackFilePath, "unPackPath:", unPackPath) + _,err := util.UnTarGzByCmd(unPackFilePath, unPackPath) if err !=nil { logger.Debug("UnPack err:",err,"unPackFile:",unPackFilePath) return false, err @@ -107,8 +108,8 @@ soM := make(map[string]SdkDef) var skDefArr []SdkDef if err = json.Unmarshal(defB, &skDefArr);err == nil { - zconfPath := "/opt/vasystem/bin/zconf/" - libPath := "/opt/vasystem/libs/" + zconfPath := "/opt/vasystem/bin/zconft/" + libPath := "/opt/vasystem/libst/" if !util.DirExists(zconfPath) { os.MkdirAll(zconfPath, 0777) } @@ -128,14 +129,14 @@ } } if util.DirExists(unPackPath+sdkType+"/models") { - if _,cE := util.CopyDirByCmd(unPackPath+sdkType+"/models", "/opt/vasystem/bin/"); cE != nil { + if _,cE := util.CopyDirByCmd(unPackPath+sdkType+"/models", "/opt/vasystem/bin/zconft"); cE != nil { return false, cE } } } } //娉ㄥ唽绠楁硶淇℃伅鍜岀畻娉曞弬鏁板埌dbserver - var sdkApi dbapi.SdkApi + //var sdkApi dbapi.SdkApi for _,skd := range skDefArr { if _,ok := soM[skd.Def.SdkType];!ok { soM[skd.Def.SdkType] = skd @@ -166,7 +167,8 @@ srv.Args = append(srv.Args, sra) } paramBody := util.Struct2Map(srv) - sdkApi.Register(paramBody) //灏嗙畻娉曟敞鍐屽埌鏁版嵁搴撲腑 + logger.Debug("sdkApi.Register paramBody:", paramBody) + //sdkApi.Register(paramBody) //灏嗙畻娉曟敞鍐屽埌鏁版嵁搴撲腑 } } else { return false, errors.New("鍙嶅簭鍒楀寲绠楁硶瀹氫箟淇℃伅澶辫触") -- Gitblit v1.8.0