Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
cdb5bdb0
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
cdb5bdb0
编写于
2月 08, 2022
作者:
M
Minglei Jin
提交者:
GitHub
2月 08, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #10132 from taosdata/release/TS-1166
[TS-1166]<release>: change for release script
上级
205b68a9
ca755184
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
109 addition
and
60 deletion
+109
-60
packaging/release.sh
packaging/release.sh
+1
-0
packaging/sed_pro.sh
packaging/sed_pro.sh
+48
-0
packaging/tools/install.sh
packaging/tools/install.sh
+18
-21
packaging/tools/install_client.sh
packaging/tools/install_client.sh
+0
-6
packaging/tools/make_install.sh
packaging/tools/make_install.sh
+0
-9
packaging/tools/makepkg.sh
packaging/tools/makepkg.sh
+33
-12
packaging/tools/remove.sh
packaging/tools/remove.sh
+7
-8
packaging/tools/remove_client.sh
packaging/tools/remove_client.sh
+0
-2
src/client/src/tscSql.c
src/client/src/tscSql.c
+2
-2
未找到文件。
packaging/release.sh
浏览文件 @
cdb5bdb0
...
...
@@ -205,6 +205,7 @@ else
allocator_macro
=
""
fi
# 3. replace product info
if
[[
"
$dbName
"
!=
"taos"
]]
;
then
replace_community_
$dbName
fi
...
...
packaging/sed_pro.sh
浏览文件 @
cdb5bdb0
#!/bin/bash
function
replace_community_pro
()
{
# src/kit/taos-tools/packaging/tools/install-taostools.sh
sed
-i
"s/demoName=
\"
taosdemo
\"
/demoName=
\"
prodemo
\"
/g"
${
top_dir
}
/src/kit/taos-tools/packaging/tools/install-taostools.sh
sed
-i
"s/benchmarkName=
\"
taosBenchmark
\"
/benchmarkName=
\"
proBenchmark
\"
/g"
${
top_dir
}
/src/kit/taos-tools/packaging/tools/install-taostools.sh
sed
-i
"s/dumpName=
\"
taosdump
\"
/dumpName=
\"
prodump
\"
/g"
${
top_dir
}
/src/kit/taos-tools/packaging/tools/install-taostools.sh
sed
-i
"s/emailName=
\"
taosdata
\.
com
\"
/emailName=
\"
hanatech
\.
com
\.
cn
\"
/g"
${
top_dir
}
/src/kit/taos-tools/packaging/tools/install-taostools.sh
sed
-i
"s/taosName=
\"
taos
\"
/taosName=
\"
prodb
\"
/g"
${
top_dir
}
/src/kit/taos-tools/packaging/tools/install-taostools.sh
sed
-i
"s/toolsName=
\"
taostools
\"
/toolsName=
\"
prodbtools
\"
/g"
${
top_dir
}
/src/kit/taos-tools/packaging/tools/install-taostools.sh
cp
-f
${
top_dir
}
/src/kit/taos-tools/packaging/tools/install-taostools.sh
${
top_dir
}
/src/kit/taos-tools/packaging/tools/install-prodbtools.sh
# src/kit/taos-tools/packaging/tools/uninstall-taostools.sh
sed
-i
"s/demoName=
\"
taosdemo
\"
/demoName=
\"
prodemo
\"
/g"
${
top_dir
}
/src/kit/taos-tools/packaging/tools/uninstall-taostools.sh
sed
-i
"s/benchmarkName=
\"
taosBenchmark
\"
/benchmarkName=
\"
proBenchmark
\"
/g"
${
top_dir
}
/src/kit/taos-tools/packaging/tools/uninstall-taostools.sh
sed
-i
"s/dumpName=
\"
taosdump
\"
/dumpName=
\"
prodump
\"
/g"
${
top_dir
}
/src/kit/taos-tools/packaging/tools/uninstall-taostools.sh
sed
-i
"s/taosName=
\"
taos
\"
/taosName=
\"
prodb
\"
/g"
${
top_dir
}
/src/kit/taos-tools/packaging/tools/uninstall-taostools.sh
sed
-i
"s/toolsName=
\"
taostools
\"
/toolsName=
\"
prodbtools
\"
/g"
${
top_dir
}
/src/kit/taos-tools/packaging/tools/uninstall-taostools.sh
cp
-f
${
top_dir
}
/src/kit/taos-tools/packaging/tools/uninstall-taostools.sh
${
top_dir
}
/src/kit/taos-tools/packaging/tools/uninstall-prodbtools.sh
# src/kit/taos-tools/src/CMakeLists.txt
sed
-i
"s/taosBenchmark /proBenchmark /g"
${
top_dir
}
/src/kit/taos-tools/src/CMakeLists.txt
sed
-i
"s/taosdump /prodump /g"
${
top_dir
}
/src/kit/taos-tools/src/CMakeLists.txt
# src/kit/taos-tools/CMakeLists.txt
sed
-i
"s/taosdump/prodump/g"
${
top_dir
}
/src/kit/taos-tools/CMakeLists.txt
sed
-i
"s/taosBenchmark/proBenchmark/g"
${
top_dir
}
/src/kit/taos-tools/CMakeLists.txt
# src/kit/taos-tools/src/benchCommandOpt.c
sed
-i
"s/support@taosdata
\.
com/support@hanatech
\.
com
\.
cn/g"
${
top_dir
}
/src/kit/taos-tools/src/benchCommandOpt.c
sed
-i
"s/taosc/prodbc/g"
${
top_dir
}
/src/kit/taos-tools/src/benchCommandOpt.c
sed
-i
"s/default is taosdata/default is prodb/g"
${
top_dir
}
/src/kit/taos-tools/src/benchCommandOpt.c
# src/kit/taos-tools/src/taosdump.c
sed
-i
"s/support@taosdata
\.
com/support@hanatech
\.
com
\.
cn/g"
${
top_dir
}
/src/kit/taos-tools/src/taosdump.c
sed
-i
"s/
\/
etc
\/
taos/
\/
etc
\/
ProDB/g"
${
top_dir
}
/src/kit/taos-tools/src/taosdump.c
sed
-i
"s/taosdata/prodb/g"
${
top_dir
}
/src/kit/taos-tools/src/taosdump.c
sed
-i
"s/taosdump version/prodump version/g"
${
top_dir
}
/src/kit/taos-tools/src/taosdump.c
sed
-i
"s/taosdump --help/prodump --help/g"
${
top_dir
}
/src/kit/taos-tools/src/taosdump.c
sed
-i
"s/taosdump --usage/prodump --usage/g"
${
top_dir
}
/src/kit/taos-tools/src/taosdump.c
sed
-i
"s/
\"
taosdump
\"
/
\"
prodump
\"
/g"
${
top_dir
}
/src/kit/taos-tools/src/taosdump.c
sed
-i
"s/TDengine/ProDB/g"
${
top_dir
}
/src/kit/taos-tools/src/taosdump.c
sed
-i
"s/taosdump requires/prodump requires/g"
${
top_dir
}
/src/kit/taos-tools/src/taosdump.c
# cmake/install.inc
sed
-i
"s/C:
\/
TDengine/C:
\/
ProDB/g"
${
top_dir
}
/cmake/install.inc
sed
-i
"s/taos
\.
cfg/prodb
\.
cfg/g"
${
top_dir
}
/cmake/install.inc
...
...
@@ -59,17 +97,26 @@ function replace_community_pro() {
sed
-i
"s/clientName=
\"
taos
\"
/clientName=
\"
prodbc
\"
/g"
${
top_dir
}
/packaging/tools/makepkg.sh
sed
-i
"s/configFile=
\"
taos
\.
cfg
\"
/configFile=
\"
prodb
\.
cfg
\"
/g"
${
top_dir
}
/packaging/tools/makepkg.sh
sed
-i
"s/tarName=
\"
taos
\.
tar
\.
gz
\"
/tarName=
\"
prodb
\.
tar
\.
gz
\"
/g"
${
top_dir
}
/packaging/tools/makepkg.sh
sed
-i
"s/dumpName=
\"
taosdump
\"
/dumpName=
\"
prodump
\"
/g"
${
top_dir
}
/packaging/tools/makepkg.sh
sed
-i
"s/benchmarkName=
\"
taosBenchmark
\"
/benchmarkName=
\"
proBenchmark
\"
/g"
${
top_dir
}
/packaging/tools/makepkg.sh
sed
-i
"s/toolsName=
\"
taostools
\"
/toolsName=
\"
prodbtools
\"
/g"
${
top_dir
}
/packaging/tools/makepkg.sh
sed
-i
"s/adapterName=
\"
taosadapter
\"
/adapterName=
\"
proadapter
\"
/g"
${
top_dir
}
/packaging/tools/makepkg.sh
sed
-i
"s/defaultPasswd=
\"
taosdata
\"
/defaultPasswd=
\"
prodb
\"
/g"
${
top_dir
}
/packaging/tools/makepkg.sh
# packaging/tools/remove.sh
sed
-i
"s/installDir=
\"\/
usr
\/
local
\/
taos
\"
/installDir=
\"\/
usr
\/
local
\/
ProDB
\"
/g"
${
top_dir
}
/packaging/tools/remove.sh
sed
-i
"s/serverName=
\"
taosd
\"
/serverName=
\"
prodbs
\"
/g"
${
top_dir
}
/packaging/tools/remove.sh
sed
-i
"s/clientName=
\"
taos
\"
/clientName=
\"
prodbc
\"
/g"
${
top_dir
}
/packaging/tools/remove.sh
sed
-i
"s/uninstallScript=
\"
rmtaos
\"
/uninstallScript=
\"
rmpro
\"
/g"
${
top_dir
}
/packaging/tools/remove.sh
sed
-i
"s/productName=
\"
TDengine
\"
/productName=
\"
ProDB
\"
/g"
${
top_dir
}
/packaging/tools/remove.sh
sed
-i
"s/adapterName=
\"
taosadapter
\"
/adapterName=
\"
proadapter
\"
/g"
${
top_dir
}
/packaging/tools/remove.sh
# packaging/tools/startPre.sh
sed
-i
"s/serverName=
\"
taosd
\"
/serverName=
\"
prodbs
\"
/g"
${
top_dir
}
/packaging/tools/startPre.sh
sed
-i
"s/logDir=
\"\/
var
\/
log
\/
taos
\"
/logDir=
\"\/
var
\/
log
\/
ProDB
\"
/g"
${
top_dir
}
/packaging/tools/startPre.sh
# packaging/tools/run_taosd_and_taosadapter.sh
sed
-i
"s/taosd/prodbs/g"
${
top_dir
}
/packaging/tools/run_taosd_and_taosadapter.sh
sed
-i
"s/taosadapter/proadapter/g"
${
top_dir
}
/packaging/tools/run_taosd_and_taosadapter.sh
# packaging/tools/install.sh
sed
-i
"s/clientName=
\"
taos
\"
/clientName=
\"
prodbc
\"
/g"
${
top_dir
}
/packaging/tools/install.sh
sed
-i
"s/serverName=
\"
taosd
\"
/serverName=
\"
prodbs
\"
/g"
${
top_dir
}
/packaging/tools/install.sh
...
...
@@ -83,6 +130,7 @@ function replace_community_pro() {
sed
-i
"s/logDir=
\"\/
var
\/
log
\/
taos
\"
/logDir=
\"\/
var
\/
log
\/
ProDB
\"
/g"
${
top_dir
}
/packaging/tools/install.sh
sed
-i
"s/configDir=
\"\/
etc
\/
taos
\"
/configDir=
\"\/
etc
\/
ProDB
\"
/g"
${
top_dir
}
/packaging/tools/install.sh
sed
-i
"s/installDir=
\"\/
usr
\/
local
\/
taos
\"
/installDir=
\"\/
usr
\/
local
\/
ProDB
\"
/g"
${
top_dir
}
/packaging/tools/install.sh
sed
-i
"s/adapterName=
\"
taosadapter
\"
/adapterName=
\"
proadapter
\"
/g"
${
top_dir
}
/packaging/tools/install.sh
# packaging/tools/makeclient.sh
sed
-i
"s/productName=
\"
TDengine
\"
/productName=
\"
ProDB
\"
/g"
${
top_dir
}
/packaging/tools/makeclient.sh
...
...
packaging/tools/install.sh
浏览文件 @
cdb5bdb0
...
...
@@ -28,6 +28,7 @@ dataDir="/var/lib/taos"
logDir
=
"/var/log/taos"
configDir
=
"/etc/taos"
installDir
=
"/usr/local/taos"
adapterName
=
"taosadapter"
data_dir
=
${
dataDir
}
log_dir
=
${
logDir
}
...
...
@@ -188,25 +189,21 @@ function install_bin() {
# Remove links
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
clientName
}
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
serverName
}
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosadapter
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosdemo
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosdump
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
adapterName
}
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
uninstallScript
}
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/tarbitrator
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/set_core
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/run_taosd_and_
taosadapter
.sh
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/run_taosd_and_
${
adapterName
}
.sh
||
:
${
csudo
}
cp
-r
${
script_dir
}
/bin/
*
${
install_main_dir
}
/bin
&&
${
csudo
}
chmod
0555
${
install_main_dir
}
/bin/
*
#Make link
[
-x
${
install_main_dir
}
/bin/
${
clientName
}
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/
${
clientName
}
${
bin_link_dir
}
/
${
clientName
}
||
:
[
-x
${
install_main_dir
}
/bin/
${
serverName
}
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/
${
serverName
}
${
bin_link_dir
}
/
${
serverName
}
||
:
[
-x
${
install_main_dir
}
/bin/taosadapter
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taosadapter
${
bin_link_dir
}
/taosadapter
||
:
[
-x
${
install_main_dir
}
/bin/taosBenchmark
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taosBenchmark
${
bin_link_dir
}
/taosdemo
||
:
[
-x
${
install_main_dir
}
/bin/taosdump
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taosdump
${
bin_link_dir
}
/taosdump
||
:
[
-x
${
install_main_dir
}
/bin/
${
adapterName
}
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/
${
adapterName
}
${
bin_link_dir
}
/
${
adapterName
}
||
:
[
-x
${
install_main_dir
}
/bin/remove.sh
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/remove.sh
${
bin_link_dir
}
/
${
uninstallScript
}
||
:
[
-x
${
install_main_dir
}
/bin/set_core.sh
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/set_core.sh
${
bin_link_dir
}
/set_core
||
:
[
-x
${
install_main_dir
}
/bin/run_taosd_and_
taosadapter.sh
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/run_taosd_and_taosadapter.sh
${
bin_link_dir
}
/run_taosd_and_taosadapter
.sh
||
:
[
-x
${
install_main_dir
}
/bin/run_taosd_and_
${
adapterName
}
.sh
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/run_taosd_and_
${
adapterName
}
.sh
${
bin_link_dir
}
/run_taosd_and_
${
adapterName
}
.sh
||
:
[
-x
${
install_main_dir
}
/bin/tarbitrator
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/tarbitrator
${
bin_link_dir
}
/tarbitrator
||
:
if
[
"
$verMode
"
==
"cluster"
]
;
then
...
...
@@ -464,17 +461,17 @@ function local_fqdn_check() {
}
function
install_taosadapter_config
()
{
if
[
!
-f
"
${
cfg_install_dir
}
/
taosadapter
.toml"
]
;
then
if
[
!
-f
"
${
cfg_install_dir
}
/
${
adapterName
}
.toml"
]
;
then
${
csudo
}
mkdir
-p
${
cfg_install_dir
}
[
-f
${
script_dir
}
/cfg/
taosadapter.toml
]
&&
${
csudo
}
cp
${
script_dir
}
/cfg/taosadapter
.toml
${
cfg_install_dir
}
[
-f
${
cfg_install_dir
}
/
taosadapter.toml
]
&&
${
csudo
}
chmod
644
${
cfg_install_dir
}
/taosadapter
.toml
[
-f
${
script_dir
}
/cfg/
${
adapterName
}
.toml
]
&&
${
csudo
}
cp
${
script_dir
}
/cfg/
${
adapterName
}
.toml
${
cfg_install_dir
}
[
-f
${
cfg_install_dir
}
/
${
adapterName
}
.toml
]
&&
${
csudo
}
chmod
644
${
cfg_install_dir
}
/
${
adapterName
}
.toml
fi
[
-f
${
script_dir
}
/cfg/
taosadapter
.toml
]
&&
${
csudo
}
cp
-f
${
script_dir
}
/cfg/
taosadapter.toml
${
cfg_install_dir
}
/taosadapter
.toml.new
[
-f
${
script_dir
}
/cfg/
${
adapterName
}
.toml
]
&&
${
csudo
}
cp
-f
${
script_dir
}
/cfg/
${
adapterName
}
.toml
${
cfg_install_dir
}
/
${
adapterName
}
.toml.new
[
-f
${
cfg_install_dir
}
/
taosadapter
.toml
]
&&
${
csudo
}
ln
-s
${
cfg_install_dir
}
/
taosadapter.toml
${
install_main_dir
}
/cfg/taosadapter
.toml
[
-f
${
cfg_install_dir
}
/
${
adapterName
}
.toml
]
&&
${
csudo
}
ln
-s
${
cfg_install_dir
}
/
${
adapterName
}
.toml
${
install_main_dir
}
/cfg/
${
adapterName
}
.toml
[
!
-z
$1
]
&&
return
0
||
:
# only install client
...
...
@@ -687,8 +684,8 @@ function install_service_on_systemd() {
function
install_taosadapter_service
()
{
if
((
${
service_mod
}
==
0
))
;
then
[
-f
${
script_dir
}
/cfg/
taosadapter
.service
]
&&
${
csudo
}
cp
${
script_dir
}
/cfg/
taosadapter
.service
\
[
-f
${
script_dir
}
/cfg/
${
adapterName
}
.service
]
&&
${
csudo
}
cp
${
script_dir
}
/cfg/
${
adapterName
}
.service
\
${
service_config_dir
}
/
||
:
${
csudo
}
systemctl daemon-reload
fi
...
...
@@ -831,13 +828,13 @@ function update_TDengine() {
echo
echo
-e
"
${
GREEN_DARK
}
To configure
${
productName
}
${
NC
}
: edit
${
cfg_install_dir
}
/
${
configFile
}
"
echo
-e
"
${
GREEN_DARK
}
To configure Taos Adapter (if has)
${
NC
}
: edit
${
cfg_install_dir
}
/
taosadapter
.toml"
echo
-e
"
${
GREEN_DARK
}
To configure Taos Adapter (if has)
${
NC
}
: edit
${
cfg_install_dir
}
/
${
adapterName
}
.toml"
if
((
${
service_mod
}
==
0
))
;
then
echo
-e
"
${
GREEN_DARK
}
To start
${
productName
}
${
NC
}
:
${
csudo
}
systemctl start
${
serverName
}${
NC
}
"
elif
((
${
service_mod
}
==
1
))
;
then
echo
-e
"
${
GREEN_DARK
}
To start
${
productName
}
${
NC
}
:
${
csudo
}
service
${
serverName
}
start
${
NC
}
"
else
echo
-e
"
${
GREEN_DARK
}
To start Taos Adapter (if has)
${
NC
}
:
taosadapter
&
${
NC
}
"
echo
-e
"
${
GREEN_DARK
}
To start Taos Adapter (if has)
${
NC
}
:
${
adapterName
}
&
${
NC
}
"
echo
-e
"
${
GREEN_DARK
}
To start
${
productName
}
${
NC
}
: ./
${
serverName
}${
NC
}
"
fi
...
...
@@ -917,13 +914,13 @@ function install_TDengine() {
# Ask if to start the service
echo
echo
-e
"
${
GREEN_DARK
}
To configure
${
productName
}
${
NC
}
: edit
${
cfg_install_dir
}
/
${
configFile
}
"
echo
-e
"
${
GREEN_DARK
}
To configure
taosadapter (if has)
${
NC
}
: edit
${
cfg_install_dir
}
/taosadapter
.toml"
echo
-e
"
${
GREEN_DARK
}
To configure
${
adapterName
}
(if has)
${
NC
}
: edit
${
cfg_install_dir
}
/
${
adapterName
}
.toml"
if
((
${
service_mod
}
==
0
))
;
then
echo
-e
"
${
GREEN_DARK
}
To start
${
productName
}
${
NC
}
:
${
csudo
}
systemctl start
${
serverName
}${
NC
}
"
elif
((
${
service_mod
}
==
1
))
;
then
echo
-e
"
${
GREEN_DARK
}
To start
${
productName
}
${
NC
}
:
${
csudo
}
service
${
serverName
}
start
${
NC
}
"
else
echo
-e
"
${
GREEN_DARK
}
To start Taos Adapter (if has)
${
NC
}
:
taosadapter
&
${
NC
}
"
echo
-e
"
${
GREEN_DARK
}
To start Taos Adapter (if has)
${
NC
}
:
${
adapterName
}
&
${
NC
}
"
echo
-e
"
${
GREEN_DARK
}
To start
${
productName
}
${
NC
}
:
${
serverName
}${
NC
}
"
fi
...
...
packaging/tools/install_client.sh
浏览文件 @
cdb5bdb0
...
...
@@ -92,9 +92,6 @@ function install_main_path() {
function
install_bin
()
{
# Remove links
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
clientName
}
||
:
if
[
"
$osType
"
!=
"Darwin"
]
;
then
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosdemo
||
:
fi
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
uninstallScript
}
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/set_core
||
:
...
...
@@ -102,9 +99,6 @@ function install_bin() {
#Make link
[
-x
${
install_main_dir
}
/bin/
${
clientName
}
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/
${
clientName
}
${
bin_link_dir
}
/
${
clientName
}
||
:
if
[
"
$osType
"
!=
"Darwin"
]
;
then
[
-x
${
install_main_dir
}
/bin/taosdemo
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taosdemo
${
bin_link_dir
}
/taosdemo
||
:
fi
[
-x
${
install_main_dir
}
/bin/remove_client.sh
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/remove_client.sh
${
bin_link_dir
}
/
${
uninstallScript
}
||
:
[
-x
${
install_main_dir
}
/bin/set_core.sh
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/set_core.sh
${
bin_link_dir
}
/set_core
||
:
}
...
...
packaging/tools/make_install.sh
浏览文件 @
cdb5bdb0
...
...
@@ -169,8 +169,6 @@ function install_bin() {
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
clientName
}
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
serverName
}
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosadapter
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosdemo
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosdump
||
:
if
[
"
$osType
"
!=
"Darwin"
]
;
then
${
csudo
}
rm
-f
${
bin_link_dir
}
/perfMonitor
||
:
...
...
@@ -180,9 +178,6 @@ function install_bin() {
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
uninstallScript
}
||
:
${
csudo
}
cp
-r
${
binary_dir
}
/build/bin/taos
${
install_main_dir
}
/bin
||
:
[
-f
${
binary_dir
}
/build/bin/taosBenchmark
]
&&
${
csudo
}
cp
-r
${
binary_dir
}
/build/bin/taosBenchmark
${
install_main_dir
}
/bin
||
:
[
-f
${
install_main_dir
}
/bin/taosBenchmark
]
&&
${
csudo
}
ln
-sf
${
install_main_dir
}
/bin/taosBenchmark
${
install_main_dir
}
/bin/taosdemo
||
:
[
-f
${
binary_dir
}
/build/bin/taosdump
]
&&
${
csudo
}
cp
-r
${
binary_dir
}
/build/bin/taosdump
${
install_main_dir
}
/bin
||
:
[
-f
${
binary_dir
}
/build/bin/taosadapter
]
&&
${
csudo
}
cp
-r
${
binary_dir
}
/build/bin/taosadapter
${
install_main_dir
}
/bin
||
:
${
csudo
}
cp
-r
${
binary_dir
}
/build/bin/taosd
${
install_main_dir
}
/bin
||
:
${
csudo
}
cp
-r
${
binary_dir
}
/build/bin/tarbitrator
${
install_main_dir
}
/bin
||
:
...
...
@@ -198,8 +193,6 @@ function install_bin() {
[
-x
${
install_main_dir
}
/bin/
${
clientName
}
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/
${
clientName
}
${
bin_link_dir
}
/
${
clientName
}
||
:
[
-x
${
install_main_dir
}
/bin/
${
serverName
}
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/
${
serverName
}
${
bin_link_dir
}
/
${
serverName
}
||
:
[
-x
${
install_main_dir
}
/bin/taosadapter
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taosadapter
${
bin_link_dir
}
/taosadapter
||
:
[
-x
${
install_main_dir
}
/bin/taosdump
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taosdump
${
bin_link_dir
}
/taosdump
||
:
[
-x
${
install_main_dir
}
/bin/taosdemo
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taosdemo
${
bin_link_dir
}
/taosdemo
||
:
[
-x
${
install_main_dir
}
/bin/perfMonitor
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/perfMonitor
${
bin_link_dir
}
/perfMonitor
||
:
[
-x
${
install_main_dir
}
/set_core.sh
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/set_core.sh
${
bin_link_dir
}
/set_core
||
:
[
-x
${
install_main_dir
}
/run_taosd_and_taosadapter.sh
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/run_taosd_and_taosadapter.sh
${
bin_link_dir
}
/run_taosd_and_taosadapter.sh
||
:
...
...
@@ -214,8 +207,6 @@ function install_bin() {
[
-x
${
install_main_dir
}
/bin/
${
clientName
}
]
||
[
-x
${
install_main_2_dir
}
/bin/
${
clientName
}
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/
${
clientName
}
${
bin_link_dir
}
/
${
clientName
}
||
${
csudo
}
ln
-s
${
install_main_2_dir
}
/bin/
${
clientName
}
||
:
[
-x
${
install_main_dir
}
/bin/
${
serverName
}
]
||
[
-x
${
install_main_2_dir
}
/bin/
${
serverName
}
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/
${
serverName
}
${
bin_link_dir
}
/
${
serverName
}
||
${
csudo
}
ln
-s
${
install_main_2_dir
}
/bin/
${
serverName
}
||
:
[
-x
${
install_main_dir
}
/bin/taosadapter
]
||
[
-x
${
install_main_2_dir
}
/bin/taosadapter
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taosadapter
${
bin_link_dir
}
/taosadapter
||
${
csudo
}
ln
-s
${
install_main_2_dir
}
/bin/taosadapter
||
:
[
-x
${
install_main_dir
}
/bin/taosdump
]
||
[
-x
${
install_main_2_dir
}
/bin/taosdump
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taosdump
${
bin_link_dir
}
/taosdump
||
ln
-s
${
install_main_2_dir
}
/bin/taosdump
${
bin_link_dir
}
/taosdump
||
:
[
-x
${
install_main_dir
}
/bin/taosdemo
]
||
[
-x
${
install_main_2_dir
}
/bin/taosdemo
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taosdemo
${
bin_link_dir
}
/taosdemo
||
ln
-s
${
install_main_2_dir
}
/bin/taosdemo
${
bin_link_dir
}
/taosdemo
||
:
fi
}
...
...
packaging/tools/makepkg.sh
浏览文件 @
cdb5bdb0
...
...
@@ -25,6 +25,11 @@ serverName="taosd"
clientName
=
"taos"
configFile
=
"taos.cfg"
tarName
=
"taos.tar.gz"
dumpName
=
"taosdump"
benchmarkName
=
"taosBenchmark"
toolsName
=
"taostools"
adapterName
=
"taosadapter"
defaultPasswd
=
"taosdata"
# create compressed install file.
build_dir
=
"
${
compile_dir
}
/build"
...
...
@@ -68,8 +73,8 @@ else
${
script_dir
}
/startPre.sh
\
${
script_dir
}
/taosd-dump-cfg.gdb"
taostools_bin_files
=
"
${
build_dir
}
/bin/
taosdump
\
${
build_dir
}
/bin/
taosBenchmark
"
taostools_bin_files
=
"
${
build_dir
}
/bin/
${
dumpName
}
\
${
build_dir
}
/bin/
${
benchmarkName
}
"
fi
lib_files
=
"
${
build_dir
}
/lib/libtaos.so.
${
version
}
"
...
...
@@ -101,6 +106,8 @@ if [ -f "${compile_dir}/test/cfg/taosadapter.service" ]; then
cp
${
compile_dir
}
/test/cfg/taosadapter.service
${
install_dir
}
/cfg
||
:
fi
if
[
-f
"
${
cfg_dir
}
/
${
serverName
}
.service"
]
;
then
cp
${
cfg_dir
}
/
${
serverName
}
.service
${
install_dir
}
/cfg
||
:
fi
...
...
@@ -119,28 +126,42 @@ mkdir -p ${install_dir}/init.d && cp ${init_file_rpm} ${install_dir}/init.d/${se
mkdir
-p
${
install_dir
}
/init.d
&&
cp
${
init_file_tarbitrator_deb
}
${
install_dir
}
/init.d/tarbitratord.deb
||
:
mkdir
-p
${
install_dir
}
/init.d
&&
cp
${
init_file_tarbitrator_rpm
}
${
install_dir
}
/init.d/tarbitratord.rpm
||
:
if
[
$adapterName
!=
"taosadapter"
]
;
then
mv
${
install_dir
}
/cfg/taosadapter.toml
${
install_dir
}
/cfg/
$adapterName
.toml
sed
-i
"s/path =
\"\/
var
\/
log
\/
taos
\"
/path =
\"\/
var
\/
log
\/
${
productName
}
\"
/g"
${
install_dir
}
/cfg/
$adapterName
.toml
sed
-i
"s/password =
\"
taosdata
\"
/password =
\"
${
defaultPasswd
}
\"
/g"
${
install_dir
}
/cfg/
$adapterName
.toml
mv
${
install_dir
}
/cfg/taosadapter.service
${
install_dir
}
/cfg/
$adapterName
.service
sed
-i
"s/TDengine/
${
productName
}
/g"
${
install_dir
}
/cfg/
$adapterName
.service
sed
-i
"s/taosAdapter/
${
adapterName
}
/g"
${
install_dir
}
/cfg/
$adapterName
.service
sed
-i
"s/taosadapter/
${
adapterName
}
/g"
${
install_dir
}
/cfg/
$adapterName
.service
mv
${
install_dir
}
/bin/taosadapter
${
install_dir
}
/bin/
${
adapterName
}
mv
${
install_dir
}
/bin/run_taosd_and_taosadapter.sh
${
install_dir
}
/bin/run_taosd_and_
${
adapterName
}
.sh
fi
if
[
-n
"
${
taostools_bin_files
}
"
]
;
then
mkdir
-p
${
taostools_install_dir
}
||
echo
-e
"failed to create
${
taostools_install_dir
}
"
mkdir
-p
${
taostools_install_dir
}
/bin
&&
cp
${
taostools_bin_files
}
${
taostools_install_dir
}
/bin
&&
chmod
a+x
${
taostools_install_dir
}
/bin/
*
||
:
if
[
-f
${
top_dir
}
/src/kit/taos-tools/packaging/tools/install-
taostools
.sh
]
;
then
cp
${
top_dir
}
/src/kit/taos-tools/packaging/tools/install-
taostools
.sh
\
if
[
-f
${
top_dir
}
/src/kit/taos-tools/packaging/tools/install-
${
toolsName
}
.sh
]
;
then
cp
${
top_dir
}
/src/kit/taos-tools/packaging/tools/install-
${
toolsName
}
.sh
\
${
taostools_install_dir
}
/
>
/dev/null
&&
chmod
a+x
${
taostools_install_dir
}
/install-
taostools
.sh
||
echo
-e
"failed to copy install-
taostools
.sh"
chmod
a+x
${
taostools_install_dir
}
/install-
${
toolsName
}
.sh
||
echo
-e
"failed to copy install-
${
toolsName
}
.sh"
else
echo
-e
"install-
taostools
.sh not found"
echo
-e
"install-
${
toolsName
}
.sh not found"
fi
if
[
-f
${
top_dir
}
/src/kit/taos-tools/packaging/tools/uninstall-
taostools
.sh
]
;
then
cp
${
top_dir
}
/src/kit/taos-tools/packaging/tools/uninstall-
taostools
.sh
\
if
[
-f
${
top_dir
}
/src/kit/taos-tools/packaging/tools/uninstall-
${
toolsName
}
.sh
]
;
then
cp
${
top_dir
}
/src/kit/taos-tools/packaging/tools/uninstall-
${
toolsName
}
.sh
\
${
taostools_install_dir
}
/
>
/dev/null
&&
chmod
a+x
${
taostools_install_dir
}
/uninstall-
taostools
.sh
||
echo
-e
"failed to copy uninstall-
taostools
.sh"
chmod
a+x
${
taostools_install_dir
}
/uninstall-
${
toolsName
}
.sh
||
echo
-e
"failed to copy uninstall-
${
toolsName
}
.sh"
else
echo
-e
"uninstall-
taostools
.sh not found"
echo
-e
"uninstall-
${
toolsName
}
.sh not found"
fi
if
[
-f
${
build_dir
}
/lib/libavro.so.23.0.0
]
;
then
...
...
packaging/tools/remove.sh
浏览文件 @
cdb5bdb0
...
...
@@ -16,6 +16,7 @@ serverName="taosd"
clientName
=
"taos"
uninstallScript
=
"rmtaos"
productName
=
"TDengine"
adapterName
=
"taosadapter"
#install main path
install_main_dir
=
${
installDir
}
...
...
@@ -30,7 +31,7 @@ install_nginxd_dir="/usr/local/nginxd"
service_config_dir
=
"/etc/systemd/system"
taos_service_name
=
${
serverName
}
taosadapter_service_name
=
"taosadapter"
taosadapter_service_name
=
${
adapterName
}
tarbitrator_service_name
=
"tarbitratord"
nginx_service_name
=
"nginxd"
csudo
=
""
...
...
@@ -59,7 +60,7 @@ else
fi
function
kill_taosadapter
()
{
pid
=
$(
ps
-ef
|
grep
"taosadapter"
|
grep
-v
"grep"
|
awk
'{print $2}'
)
pid
=
$(
ps
-ef
|
grep
${
adapterName
}
|
grep
-v
"grep"
|
awk
'{print $2}'
)
if
[
-n
"
$pid
"
]
;
then
${
csudo
}
kill
-9
$pid
||
:
fi
...
...
@@ -82,13 +83,11 @@ function clean_bin() {
# Remove link
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
clientName
}
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
serverName
}
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosadapter
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosdemo
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosdump
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
adapterName
}
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
uninstallScript
}
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/tarbitrator
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/set_core
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/run_taosd_and_
taosadapter
.sh
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/run_taosd_and_
${
adapterName
}
.sh
||
:
}
function
clean_lib
()
{
...
...
@@ -124,9 +123,9 @@ function clean_service_on_systemd() {
${
csudo
}
systemctl disable
${
taos_service_name
}
&>/dev/null
||
echo
&>/dev/null
${
csudo
}
rm
-f
${
taosd_service_config
}
taosadapter_service_config
=
"
${
service_config_dir
}
/
taosadapter
.service"
taosadapter_service_config
=
"
${
service_config_dir
}
/
${
adapterName
}
.service"
if
systemctl is-active
--quiet
${
taosadapter_service_name
}
;
then
echo
"
${
productName
}
taosAdapter
is running, stopping it..."
echo
"
${
productName
}
${
adapterName
}
is running, stopping it..."
${
csudo
}
systemctl stop
${
taosadapter_service_name
}
&>/dev/null
||
echo
&>/dev/null
fi
${
csudo
}
systemctl disable
${
taosadapter_service_name
}
&>/dev/null
||
echo
&>/dev/null
...
...
packaging/tools/remove_client.sh
浏览文件 @
cdb5bdb0
...
...
@@ -36,8 +36,6 @@ function kill_client() {
function
clean_bin
()
{
# Remove link
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
clientName
}
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosdemo
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosdump
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/
${
uninstallScript
}
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/set_core
||
:
}
...
...
src/client/src/tscSql.c
浏览文件 @
cdb5bdb0
...
...
@@ -201,9 +201,9 @@ TAOS *taos_connect_internal(const char *ip, const char *user, const char *pass,
if
(
pSql
->
res
.
code
!=
TSDB_CODE_SUCCESS
)
{
terrno
=
pSql
->
res
.
code
;
if
(
terrno
==
TSDB_CODE_RPC_FQDN_ERROR
)
{
printf
(
"
taos
connect failed, reason: %s
\n\n
"
,
taos_errstr
(
pSql
));
printf
(
"connect failed, reason: %s
\n\n
"
,
taos_errstr
(
pSql
));
}
else
{
printf
(
"
taos
connect failed, reason: %s.
\n\n
"
,
tstrerror
(
terrno
));
printf
(
"connect failed, reason: %s.
\n\n
"
,
tstrerror
(
terrno
));
}
taos_free_result
(
pSql
);
taos_close
(
pObj
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录