未验证 提交 af1e462d 编写于 作者: Z Zhiyu Yang 提交者: GitHub

[TD-13342]<fix>: fix CI test failed when taosadapter.toml is missing (#10091)

* [TD-13342]<fix>: fix CI test failed when taosadapter.toml is missing

* use config file

* stop taosadapter
上级 81491a0f
#!/bin/bash
function stopTaosd {
echo "Stop taosd"
sudo systemctl stop taosd || echo 'no sudo or systemctl or stop fail'
PID=`ps -ef|grep -w taosd | grep -v grep | awk '{print $2}'`
function stopProcess {
echo "Stop $1"
sudo systemctl stop $1 || echo 'no sudo or systemctl or stop fail'
PID=`ps -ef|grep -w $1 | grep -v grep | awk '{print $2}'`
while [ -n "$PID" ]
do
pkill -TERM -x taosd
pkill -TERM -x $1
sleep 1
PID=`ps -ef|grep -w taosd | grep -v grep | awk '{print $2}'`
PID=`ps -ef|grep -w $1 | grep -v grep | awk '{print $2}'`
done
}
stopTaosd
stopProcess taosadapter
stopProcess taosd
rm -rf /var/lib/taos/*
rm -rf /var/log/taos/*
nohup taosd -c /etc/taos/ > /dev/null 2>&1 &
nohup taosadapter -c /etc/taos/taosadapter.toml > /dev/null 2>&1 &
curDir=$(dirname $(readlink -f "$0"))
taosdConfig=$curDir/../../../../packaging/cfg
adapterConfig=$curDir/../../../../src/plugins/taosadapter/example/config/taosadapter.toml
nohup taosd -c ${taosdConfig} > /dev/null 2>&1 &
nohup taosadapter -c ${adapterConfig} > /dev/null 2>&1 &
sleep 10
cd ../../../../
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册