echo-e"${GREEN_DARK}To access ${productName}${NC}: use ${GREEN_UNDERLINE}${clientName} -h $serverFqdn${NC} in shell OR from ${GREEN_UNDERLINE}http://127.0.0.1:${nginx_port}${NC}"
else
echo-e"${GREEN_DARK}To access ${productName}${NC}: use ${GREEN_UNDERLINE}${clientName} -h $serverFqdn${NC} in shell${NC}"
fi
if((${prompt_force}== 1));then
echo""
echo-e"${RED}Please run '${serverName} --force-keep-file' at first time for the exist ${productName}$exist_version!${NC}"
fi
echo
echo-e"\033[44;32;1m${productName} is updated successfully!${NC}"
else
install_bin
install_config
echo
echo-e"\033[44;32;1m${productName} client is updated successfully!${NC}"
fi
rm-rf$(tar-tf${tarName} | grep-v"^\./$")
}
}
function install_TDengine(){
function installProduct(){
# Start to install
# Start to install
echo-e"${GREEN}Start to install TDengine...${NC}"
if[!-e${tarName}];then
echo"File ${tarName} does not exist"
exit 1
fi
tar-zxf${tarName}
echo-e"${GREEN}Start to install ${productName}...${NC}"
install_main_path
install_main_path
if[-z$1];then
install_data
install_data
fi
install_log
install_log
install_header
install_header
install_lib
install_lib
install_taosTools
install_jemalloc
#install_avro lib
#install_avro lib64
if["$verMode"=="cluster"];then
install_connector
fi
install_examples
if[-z$1];then# install service and client
if[-z$1];then# install service and client
# For installing new
# For installing new
install_bin
install_bin
install_service
install_service
install_adapter_service
install_adapter_config
openresty_work=false
if["$verMode"=="cluster"];then
# Check if nginx is installed successfully
if type curl &>/dev/null;then
if curl -sSf http://127.0.0.1:${nginx_port} &>/dev/null;then
echo-e"\033[44;32;1mNginx for ${productName} is installed successfully!${NC}"
openresty_work=true
else
echo-e"\033[44;31;5mNginx for ${productName} does not work! Please try again!\033[0m"
fi
fi
fi
install_config
install_config
# Ask if to start the service
# Ask if to start the service
#echo
#echo -e "\033[44;32;1mTDengine is installed successfully!${NC}"