提交 a3c15992 编写于 作者: wafwerar's avatar wafwerar

fix(os): fix package client error

上级 bfa5caa2
...@@ -17,6 +17,7 @@ serverName="taosd" ...@@ -17,6 +17,7 @@ serverName="taosd"
clientName="taos" clientName="taos"
uninstallScript="rmtaos" uninstallScript="rmtaos"
configFile="taos.cfg" configFile="taos.cfg"
tarName="taos.tar.gz"
osType=Linux osType=Linux
pagMode=full pagMode=full
...@@ -242,6 +243,11 @@ function install_examples() { ...@@ -242,6 +243,11 @@ function install_examples() {
function update_TDengine() { function update_TDengine() {
# Start to update # Start to update
if [ ! -e ${tarName} ]; then
echo "File ${tarName} does not exist"
exit 1
fi
tar -zxf ${tarName}
echo -e "${GREEN}Start to update ${productName} client...${NC}" echo -e "${GREEN}Start to update ${productName} client...${NC}"
# Stop the client shell if running # Stop the client shell if running
if pidof ${clientName} &> /dev/null; then if pidof ${clientName} &> /dev/null; then
...@@ -264,42 +270,49 @@ function update_TDengine() { ...@@ -264,42 +270,49 @@ function update_TDengine() {
echo echo
echo -e "\033[44;32;1m${productName} client is updated successfully!${NC}" echo -e "\033[44;32;1m${productName} client is updated successfully!${NC}"
rm -rf $(tar -tf ${tarName})
} }
function install_TDengine() { function install_TDengine() {
# Start to install # Start to install
echo -e "${GREEN}Start to install ${productName} client...${NC}" if [ ! -e ${tarName} ]; then
echo "File ${tarName} does not exist"
install_main_path exit 1
install_log fi
install_header tar -zxf ${tarName}
install_lib echo -e "${GREEN}Start to install ${productName} client...${NC}"
install_jemalloc
if [ "$verMode" == "cluster" ]; then
install_connector
fi
install_examples
install_bin
install_config
echo install_main_path
echo -e "\033[44;32;1m${productName} client is installed successfully!${NC}" install_log
install_header
install_lib
install_jemalloc
if [ "$verMode" == "cluster" ]; then
install_connector
fi
install_examples
install_bin
install_config
echo
echo -e "\033[44;32;1m${productName} client is installed successfully!${NC}"
rm -rf $(tar -tf ${tarName}) rm -rf $(tar -tf ${tarName})
} }
## ==============================Main program starts from here============================ ## ==============================Main program starts from here============================
# Install or updata client and client # Install or updata client and client
# if server is already install, don't install client # if server is already install, don't install client
if [ -e ${bin_dir}/${serverName} ]; then if [ -e ${bin_dir}/${serverName} ]; then
echo -e "\033[44;32;1mThere are already installed ${productName} server, so don't need install client!${NC}" echo -e "\033[44;32;1mThere are already installed ${productName} server, so don't need install client!${NC}"
exit 0 exit 0
fi fi
if [ -x ${bin_dir}/${clientName} ]; then if [ -x ${bin_dir}/${clientName} ]; then
update_flag=1 update_flag=1
update_TDengine update_TDengine
else else
install_TDengine install_TDengine
fi fi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册