554325746@qq.com
2019-12-23 0222e79afe45d9fc55aed9a7e62ca239c228ab73
service/SysService.go
@@ -234,10 +234,10 @@
      return false
   }
   zipFilePath := configPatchPath+"/"+identifier+ext
   err := util.DeCompress(zipFilePath, unPackPath)
   unPackFilePath := configPatchPath+"/"+identifier+ext
   err := util.UnTarGz(unPackFilePath, unPackPath)
   if err !=nil {
      logger.Debug("UnZip err:",err,"zipFile:",zipFilePath)
      logger.Debug("UnPack err:",err,"unPackFile:",unPackFilePath)
      return false
   }
@@ -252,9 +252,9 @@
   }
   //判断更新包里是否有补丁脚本,如果有则执行,否则执行updatePatch.sh
   updateCmd := fmt.Sprintf("./updatePatch.sh %s %s %s &",unPackPath,zipFilePath,configPatchPath+"/"+identifier)
   updateCmd := fmt.Sprintf("./updatePatch.sh %s %s %s &",unPackPath,unPackFilePath,configPatchPath+"/"+identifier)
   if util.Exists(unPackPath+"upgrade.sh") {
      updateCmd = fmt.Sprintf("%supgrade.sh %s %s %s &",unPackPath,unPackPath,zipFilePath,configPatchPath+"/"+identifier)
      updateCmd = fmt.Sprintf("%supgrade.sh %s %s %s &",unPackPath,unPackPath,unPackFilePath,configPatchPath+"/"+identifier)
   }
   //2.更新系统
   b,err := ExecCmd(updateCmd)