update script
This commit is contained in:
parent
0f9da01c88
commit
43a8c77757
|
@ -607,6 +607,9 @@ function install_data() {
|
||||||
function install_connector() {
|
function install_connector() {
|
||||||
if [ -d "${script_dir}/connector/" ]; then
|
if [ -d "${script_dir}/connector/" ]; then
|
||||||
${csudo}cp -rf ${script_dir}/connector/ ${install_main_dir}/ || echo "failed to copy connector"
|
${csudo}cp -rf ${script_dir}/connector/ ${install_main_dir}/ || echo "failed to copy connector"
|
||||||
|
${csudo}cp ${script_dir}/start-all.sh ${install_main_dir}/ || echo "failed to copy start-all.sh"
|
||||||
|
${csudo}cp ${script_dir}/stop-all.sh ${install_main_dir}/ || echo "failed to copy stop-all.sh"
|
||||||
|
${csudo}cp ${script_dir}/README.md ${install_main_dir}/ || echo "failed to copy README.md"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -622,6 +625,14 @@ function install_web() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function install_taosx() {
|
||||||
|
if [ -f "${script_dir}/taosx/install_taosx.sh" ]; then
|
||||||
|
cd ${script_dir}/taosx
|
||||||
|
chmod a+x install_taosx.sh
|
||||||
|
bash install_taosx.sh
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function clean_service_on_sysvinit() {
|
function clean_service_on_sysvinit() {
|
||||||
if ps aux | grep -v grep | grep ${serverName2} &>/dev/null; then
|
if ps aux | grep -v grep | grep ${serverName2} &>/dev/null; then
|
||||||
${csudo}service ${serverName2} stop || :
|
${csudo}service ${serverName2} stop || :
|
||||||
|
@ -893,6 +904,7 @@ function updateProduct() {
|
||||||
|
|
||||||
if [ "$verMode" == "cluster" ]; then
|
if [ "$verMode" == "cluster" ]; then
|
||||||
install_connector
|
install_connector
|
||||||
|
install_taosx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install_examples
|
install_examples
|
||||||
|
@ -907,38 +919,54 @@ function updateProduct() {
|
||||||
openresty_work=false
|
openresty_work=false
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo -e "${GREEN_DARK}To configure ${productName2} ${NC}\t: edit ${cfg_install_dir}/${configFile2}"
|
echo -e "${GREEN_DARK}To configure ${productName2} ${NC}\t\t: edit ${cfg_install_dir}/${configFile2}"
|
||||||
[ -f ${configDir}/${clientName2}adapter.toml ] && [ -f ${installDir}/bin/${clientName2}adapter ] && \
|
[ -f ${configDir}/${clientName2}adapter.toml ] && [ -f ${installDir}/bin/${clientName2}adapter ] && \
|
||||||
echo -e "${GREEN_DARK}To configure ${clientName2}Adapter ${NC}\t: edit ${configDir}/${clientName2}adapter.toml"
|
echo -e "${GREEN_DARK}To configure ${clientName2}Adapter ${NC}\t: edit ${configDir}/${clientName2}adapter.toml"
|
||||||
|
if [ "$verMode" == "cluster" ]; then
|
||||||
|
echo -e "${GREEN_DARK}To configure ${clientName2}-explorer ${NC}\t: edit ${configDir}/explorer.toml"
|
||||||
|
fi
|
||||||
if ((${service_mod} == 0)); then
|
if ((${service_mod} == 0)); then
|
||||||
echo -e "${GREEN_DARK}To start ${productName2} ${NC}\t: ${csudo}systemctl start ${serverName2}${NC}"
|
echo -e "${GREEN_DARK}To start ${productName2} ${NC}\t\t: ${csudo}systemctl start ${serverName2}${NC}"
|
||||||
[ -f ${service_config_dir}/${clientName2}adapter.service ] && [ -f ${installDir}/bin/${clientName2}adapter ] && \
|
[ -f ${service_config_dir}/${clientName2}adapter.service ] && [ -f ${installDir}/bin/${clientName2}adapter ] && \
|
||||||
echo -e "${GREEN_DARK}To start ${clientName2}Adapter ${NC}\t: ${csudo}systemctl start ${clientName2}adapter ${NC}"
|
echo -e "${GREEN_DARK}To start ${clientName2}Adapter ${NC}\t\t: ${csudo}systemctl start ${clientName2}adapter ${NC}"
|
||||||
elif ((${service_mod} == 1)); then
|
elif ((${service_mod} == 1)); then
|
||||||
echo -e "${GREEN_DARK}To start ${productName2} ${NC}\t: ${csudo}service ${serverName2} start${NC}"
|
echo -e "${GREEN_DARK}To start ${productName2} ${NC}\t\t: ${csudo}service ${serverName2} start${NC}"
|
||||||
[ -f ${service_config_dir}/${clientName2}adapter.service ] && [ -f ${installDir}/bin/${clientName2}adapter ] && \
|
[ -f ${service_config_dir}/${clientName2}adapter.service ] && [ -f ${installDir}/bin/${clientName2}adapter ] && \
|
||||||
echo -e "${GREEN_DARK}To start ${clientName2}Adapter ${NC}\t: ${csudo}service ${clientName2}adapter start${NC}"
|
echo -e "${GREEN_DARK}To start ${clientName2}Adapter ${NC}\t\t: ${csudo}service ${clientName2}adapter start${NC}"
|
||||||
else
|
else
|
||||||
echo -e "${GREEN_DARK}To start ${productName2} ${NC}\t: ./${serverName2}${NC}"
|
echo -e "${GREEN_DARK}To start ${productName2} ${NC}\t\t: ./${serverName2}${NC}"
|
||||||
[ -f ${installDir}/bin/${clientName2}adapter ] && \
|
[ -f ${installDir}/bin/${clientName2}adapter ] && \
|
||||||
echo -e "${GREEN_DARK}To start ${clientName2}Adapter ${NC}\t: ${clientName2}adapter ${NC}"
|
echo -e "${GREEN_DARK}To start ${clientName2}Adapter ${NC}\t\t: ${clientName2}adapter ${NC}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${GREEN_DARK}To enable ${clientName2}keeper ${NC}\t: sudo systemctl enable ${clientName2}keeper ${NC}"
|
echo -e "${GREEN_DARK}To enable ${clientName2}keeper ${NC}\t\t: sudo systemctl enable ${clientName2}keeper ${NC}"
|
||||||
|
if [ "$verMode" == "cluster" ];then
|
||||||
if [ ${openresty_work} = 'true' ]; then
|
echo -e "${GREEN_DARK}To start ${clientName2}x ${NC}\t\t\t: sudo systemctl start ${clientName2}x ${NC}"
|
||||||
echo -e "${GREEN_DARK}To access ${productName2} ${NC}\t: use ${GREEN_UNDERLINE}${clientName2} -h $serverFqdn${NC} in shell OR from ${GREEN_UNDERLINE}http://127.0.0.1:${web_port}${NC}"
|
echo -e "${GREEN_DARK}To start ${clientName2}-explorer ${NC}\t\t: sudo systemctl start ${clientName2}-explorer ${NC}"
|
||||||
else
|
|
||||||
echo -e "${GREEN_DARK}To access ${productName2} ${NC}\t: use ${GREEN_UNDERLINE}${clientName2} -h $serverFqdn${NC} in shell${NC}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ((${prompt_force} == 1)); then
|
# if [ ${openresty_work} = 'true' ]; then
|
||||||
echo ""
|
# echo -e "${GREEN_DARK}To access ${productName2} ${NC}\t\t: use ${GREEN_UNDERLINE}${clientName2} -h $serverFqdn${NC} in shell OR from ${GREEN_UNDERLINE}http://127.0.0.1:${web_port}${NC}"
|
||||||
echo -e "${RED}Please run '${serverName2} --force-keep-file' at first time for the exist ${productName2} $exist_version!${NC}"
|
# else
|
||||||
fi
|
# echo -e "${GREEN_DARK}To access ${productName2} ${NC}\t\t: use ${GREEN_UNDERLINE}${clientName2} -h $serverFqdn${NC} in shell${NC}"
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# if ((${prompt_force} == 1)); then
|
||||||
|
# echo ""
|
||||||
|
# echo -e "${RED}Please run '${serverName2} --force-keep-file' at first time for the exist ${productName2} $exist_version!${NC}"
|
||||||
|
# fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo -e "\033[44;32;1m${productName2} is updated successfully!${NC}"
|
echo -e "\033[44;32;1m${productName2} is updated successfully!${NC}"
|
||||||
echo -e "\033[44;32;1mTo manage ${productName2} instance, view documentation or explorer features, please install ${clientName2}Explorer ${NC}"
|
echo
|
||||||
|
if [ "$verMode" == "cluster" ];then
|
||||||
|
echo -e "\033[44;32;1mTo start all the components \t: sudo ./start-all.sh${NC}"
|
||||||
|
fi
|
||||||
|
echo -e "\033[44;32;1mTo access ${productName2} \t\t: ${clientName2} -h $serverFqdn${NC}"
|
||||||
|
if [ "$verMode" == "cluster" ];then
|
||||||
|
echo -e "\033[44;32;1mTo access the management system \t: http://$serverFqdn:6060${NC}"
|
||||||
|
echo -e "\033[44;32;1mTo read the user manual \t: http://$serverFqdn:6060/docs${NC}"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
install_bin
|
install_bin
|
||||||
install_config
|
install_config
|
||||||
|
@ -947,7 +975,8 @@ function updateProduct() {
|
||||||
echo -e "\033[44;32;1m${productName2} client is updated successfully!${NC}"
|
echo -e "\033[44;32;1m${productName2} client is updated successfully!${NC}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf $(tar -tf ${tarName} | grep -Ev "^\./$|^\/")
|
cd $script_dir
|
||||||
|
rm -rf $(tar -tf ${tarName} | grep -Ev "^\./$|^\/")
|
||||||
}
|
}
|
||||||
|
|
||||||
function installProduct() {
|
function installProduct() {
|
||||||
|
@ -975,6 +1004,7 @@ function installProduct() {
|
||||||
|
|
||||||
if [ "$verMode" == "cluster" ]; then
|
if [ "$verMode" == "cluster" ]; then
|
||||||
install_connector
|
install_connector
|
||||||
|
install_taosx
|
||||||
fi
|
fi
|
||||||
install_examples
|
install_examples
|
||||||
install_web
|
install_web
|
||||||
|
@ -991,47 +1021,63 @@ function installProduct() {
|
||||||
|
|
||||||
# Ask if to start the service
|
# Ask if to start the service
|
||||||
echo
|
echo
|
||||||
echo -e "${GREEN_DARK}To configure ${productName2} ${NC}\t: edit ${cfg_install_dir}/${configFile2}"
|
echo -e "${GREEN_DARK}To configure ${productName2} ${NC}\t\t: edit ${cfg_install_dir}/${configFile2}"
|
||||||
[ -f ${configDir}/${clientName2}adapter.toml ] && [ -f ${installDir}/bin/${clientName2}adapter ] && \
|
[ -f ${configDir}/${clientName2}adapter.toml ] && [ -f ${installDir}/bin/${clientName2}adapter ] && \
|
||||||
echo -e "${GREEN_DARK}To configure ${clientName2}Adapter ${NC}\t: edit ${configDir}/${clientName2}adapter.toml"
|
echo -e "${GREEN_DARK}To configure ${clientName2}Adapter ${NC}\t: edit ${configDir}/${clientName2}adapter.toml"
|
||||||
|
if [ "$verMode" == "cluster" ]; then
|
||||||
|
echo -e "${GREEN_DARK}To configure ${clientName2}-explorer ${NC}\t: edit ${configDir}/explorer.toml"
|
||||||
|
fi
|
||||||
if ((${service_mod} == 0)); then
|
if ((${service_mod} == 0)); then
|
||||||
echo -e "${GREEN_DARK}To start ${productName2} ${NC}\t: ${csudo}systemctl start ${serverName2}${NC}"
|
echo -e "${GREEN_DARK}To start ${productName2} ${NC}\t\t: ${csudo}systemctl start ${serverName2}${NC}"
|
||||||
[ -f ${service_config_dir}/${clientName2}adapter.service ] && [ -f ${installDir}/bin/${clientName2}adapter ] && \
|
[ -f ${service_config_dir}/${clientName2}adapter.service ] && [ -f ${installDir}/bin/${clientName2}adapter ] && \
|
||||||
echo -e "${GREEN_DARK}To start ${clientName2}Adapter ${NC}\t: ${csudo}systemctl start ${clientName2}adapter ${NC}"
|
echo -e "${GREEN_DARK}To start ${clientName2}Adapter ${NC}\t\t: ${csudo}systemctl start ${clientName2}adapter ${NC}"
|
||||||
elif ((${service_mod} == 1)); then
|
elif ((${service_mod} == 1)); then
|
||||||
echo -e "${GREEN_DARK}To start ${productName2} ${NC}\t: ${csudo}service ${serverName2} start${NC}"
|
echo -e "${GREEN_DARK}To start ${productName2} ${NC}\t\t: ${csudo}service ${serverName2} start${NC}"
|
||||||
[ -f ${service_config_dir}/${clientName2}adapter.service ] && [ -f ${installDir}/bin/${clientName2}adapter ] && \
|
[ -f ${service_config_dir}/${clientName2}adapter.service ] && [ -f ${installDir}/bin/${clientName2}adapter ] && \
|
||||||
echo -e "${GREEN_DARK}To start ${clientName2}Adapter ${NC}\t: ${csudo}service ${clientName2}adapter start${NC}"
|
echo -e "${GREEN_DARK}To start ${clientName2}Adapter ${NC}\t\t: ${csudo}service ${clientName2}adapter start${NC}"
|
||||||
else
|
else
|
||||||
echo -e "${GREEN_DARK}To start ${productName2} ${NC}\t: ${serverName2}${NC}"
|
echo -e "${GREEN_DARK}To start ${productName2} ${NC}\t\t: ${serverName2}${NC}"
|
||||||
[ -f ${installDir}/bin/${clientName2}adapter ] && \
|
[ -f ${installDir}/bin/${clientName2}adapter ] && \
|
||||||
echo -e "${GREEN_DARK}To start ${clientName2}Adapter ${NC}\t: ${clientName2}adapter ${NC}"
|
echo -e "${GREEN_DARK}To start ${clientName2}Adapter ${NC}\t\t: ${clientName2}adapter ${NC}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${GREEN_DARK}To enable ${clientName2}keeper ${NC}\t: sudo systemctl enable ${clientName2}keeper ${NC}"
|
echo -e "${GREEN_DARK}To enable ${clientName2}keeper ${NC}\t\t: sudo systemctl enable ${clientName2}keeper ${NC}"
|
||||||
|
|
||||||
if [ ! -z "$firstEp" ]; then
|
if [ "$verMode" == "cluster" ];then
|
||||||
tmpFqdn=${firstEp%%:*}
|
echo -e "${GREEN_DARK}To start ${clientName2}x ${NC}\t\t\t: sudo systemctl start ${clientName2}x ${NC}"
|
||||||
substr=":"
|
echo -e "${GREEN_DARK}To start ${clientName2}-explorer ${NC}\t\t: sudo systemctl start ${clientName2}-explorer ${NC}"
|
||||||
if [[ $firstEp =~ $substr ]]; then
|
|
||||||
tmpPort=${firstEp#*:}
|
|
||||||
else
|
|
||||||
tmpPort=""
|
|
||||||
fi
|
|
||||||
if [[ "$tmpPort" != "" ]]; then
|
|
||||||
echo -e "${GREEN_DARK}To access ${productName2} ${NC}\t: ${clientName2} -h $tmpFqdn -P $tmpPort${GREEN_DARK} to login into cluster, then${NC}"
|
|
||||||
else
|
|
||||||
echo -e "${GREEN_DARK}To access ${productName2} ${NC}\t: ${clientName2} -h $tmpFqdn${GREEN_DARK} to login into cluster, then${NC}"
|
|
||||||
fi
|
|
||||||
echo -e "${GREEN_DARK}execute ${NC}: create dnode 'newDnodeFQDN:port'; ${GREEN_DARK}to add this new node${NC}"
|
|
||||||
echo
|
|
||||||
elif [ ! -z "$serverFqdn" ]; then
|
|
||||||
echo -e "${GREEN_DARK}To access ${productName2} ${NC}\t: ${clientName2} -h $serverFqdn${GREEN_DARK} to login into ${productName2} server${NC}"
|
|
||||||
echo
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# if [ ! -z "$firstEp" ]; then
|
||||||
|
# tmpFqdn=${firstEp%%:*}
|
||||||
|
# substr=":"
|
||||||
|
# if [[ $firstEp =~ $substr ]]; then
|
||||||
|
# tmpPort=${firstEp#*:}
|
||||||
|
# else
|
||||||
|
# tmpPort=""
|
||||||
|
# fi
|
||||||
|
# if [[ "$tmpPort" != "" ]]; then
|
||||||
|
# echo -e "${GREEN_DARK}To access ${productName2} ${NC}\t\t: ${clientName2} -h $tmpFqdn -P $tmpPort${GREEN_DARK} to login into cluster, then${NC}"
|
||||||
|
# else
|
||||||
|
# echo -e "${GREEN_DARK}To access ${productName2} ${NC}\t\t: ${clientName2} -h $tmpFqdn${GREEN_DARK} to login into cluster, then${NC}"
|
||||||
|
# fi
|
||||||
|
# echo -e "${GREEN_DARK}execute ${NC}: create dnode 'newDnodeFQDN:port'; ${GREEN_DARK}to add this new node${NC}"
|
||||||
|
# echo
|
||||||
|
# elif [ ! -z "$serverFqdn" ]; then
|
||||||
|
# echo -e "${GREEN_DARK}To access ${productName2} ${NC}\t\t: ${clientName2} -h $serverFqdn${GREEN_DARK} to login into ${productName2} server${NC}"
|
||||||
|
# echo
|
||||||
|
# fi
|
||||||
|
echo
|
||||||
echo -e "\033[44;32;1m${productName2} is installed successfully!${NC}"
|
echo -e "\033[44;32;1m${productName2} is installed successfully!${NC}"
|
||||||
echo -e "\033[44;32;1mTo manage ${productName2} instance, view documentation or explorer features, please install ${clientName2}Explorer ${NC}"
|
echo
|
||||||
|
if [ "$verMode" == "cluster" ];then
|
||||||
|
echo -e "\033[44;32;1mTo start all the components \t: sudo ./start-all.sh${NC}"
|
||||||
|
fi
|
||||||
|
echo -e "\033[44;32;1mTo access ${productName2} \t\t: ${clientName2} -h $serverFqdn${NC}"
|
||||||
|
if [ "$verMode" == "cluster" ];then
|
||||||
|
echo -e "\033[44;32;1mTo access the management system \t: http://$serverFqdn:6060${NC}"
|
||||||
|
echo -e "\033[44;32;1mTo read the user manual \t: http://$serverFqdn:6060/docs${NC}"
|
||||||
|
fi
|
||||||
echo
|
echo
|
||||||
else # Only install client
|
else # Only install client
|
||||||
install_bin
|
install_bin
|
||||||
|
@ -1039,7 +1085,8 @@ function installProduct() {
|
||||||
echo
|
echo
|
||||||
echo -e "\033[44;32;1m${productName2} client is installed successfully!${NC}"
|
echo -e "\033[44;32;1m${productName2} client is installed successfully!${NC}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cd $script_dir
|
||||||
touch ~/.${historyFile}
|
touch ~/.${historyFile}
|
||||||
rm -rf $(tar -tf ${tarName} | grep -Ev "^\./$|^\/")
|
rm -rf $(tar -tf ${tarName} | grep -Ev "^\./$|^\/")
|
||||||
}
|
}
|
||||||
|
@ -1070,4 +1117,4 @@ elif [ "$verType" == "client" ]; then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "please input correct verType"
|
echo "please input correct verType"
|
||||||
fi
|
fi
|
|
@ -284,8 +284,13 @@ if [ "$pagMode" == "lite" ]; then
|
||||||
fi
|
fi
|
||||||
chmod a+x ${install_dir}/install.sh
|
chmod a+x ${install_dir}/install.sh
|
||||||
|
|
||||||
if [[ $dbName == "taos" ]]; then
|
if [[ $dbName == "taos" ]]; then
|
||||||
# Copy example code
|
cp ${top_dir}/../enterprise/packaging/start-all.sh ${install_dir}
|
||||||
|
cp ${top_dir}/../enterprise/packaging/stop-all.sh ${install_dir}
|
||||||
|
cp ${top_dir}/../enterprise/packaging/README.md ${install_dir}
|
||||||
|
chmod a+x ${install_dir}/start-all.sh
|
||||||
|
chmod a+x ${install_dir}/stop-all.sh
|
||||||
|
# Copy example code
|
||||||
mkdir -p ${install_dir}/examples
|
mkdir -p ${install_dir}/examples
|
||||||
examples_dir="${top_dir}/examples"
|
examples_dir="${top_dir}/examples"
|
||||||
cp -r ${examples_dir}/c ${install_dir}/examples
|
cp -r ${examples_dir}/c ${install_dir}/examples
|
||||||
|
@ -330,8 +335,8 @@ fi
|
||||||
mkdir -p ${install_dir}/driver && cp ${lib_files} ${install_dir}/driver && echo "${versionComp}" >${install_dir}/driver/vercomp.txt
|
mkdir -p ${install_dir}/driver && cp ${lib_files} ${install_dir}/driver && echo "${versionComp}" >${install_dir}/driver/vercomp.txt
|
||||||
[ -f ${wslib_files} ] && cp ${wslib_files} ${install_dir}/driver || :
|
[ -f ${wslib_files} ] && cp ${wslib_files} ${install_dir}/driver || :
|
||||||
|
|
||||||
# Copy connector
|
# Copy connector && taosx
|
||||||
if [ "$verMode" == "cluster" ]; then
|
if [ "$verMode" == "cluster" ]; then
|
||||||
connector_dir="${code_dir}/connector"
|
connector_dir="${code_dir}/connector"
|
||||||
mkdir -p ${install_dir}/connector
|
mkdir -p ${install_dir}/connector
|
||||||
if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
|
if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
|
||||||
|
@ -364,8 +369,15 @@ if [ "$verMode" == "cluster" ]; then
|
||||||
git clone --depth 1 https://github.com/taosdata/taos-connector-rust ${install_dir}/connector/rust
|
git clone --depth 1 https://github.com/taosdata/taos-connector-rust ${install_dir}/connector/rust
|
||||||
rm -rf ${install_dir}/connector/rust/.git ||:
|
rm -rf ${install_dir}/connector/rust/.git ||:
|
||||||
|
|
||||||
# cp -r ${connector_dir}/python ${install_dir}/connector
|
# copy taosx
|
||||||
# cp -r ${connector_dir}/nodejs ${install_dir}/connector
|
if [ -d ${top_dir}/../enterprise/src/plugins/taosx/release/taosx ]; then
|
||||||
|
cp -r ${top_dir}/../enterprise/src/plugins/taosx/release/taosx ${install_dir}
|
||||||
|
cp ${top_dir}/../enterprise/packaging/install_taosx.sh ${install_dir}/taosx
|
||||||
|
cp ${top_dir}/../enterprise/src/plugins/taosx/packaging/uninstall.sh ${install_dir}/taosx
|
||||||
|
else
|
||||||
|
echo "taox package not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -436,4 +448,4 @@ if [ -n "${taostools_bin_files}" ] && [ "$verMode" != "cloud" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ${curr_dir}
|
cd ${curr_dir}
|
|
@ -284,6 +284,16 @@ function clean_service() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function uninstall_taosx() {
|
||||||
|
if [ -f /usr/local/taosx/uninstall.sh ]; then
|
||||||
|
cd /usr/local/taosx
|
||||||
|
bash uninstall.sh > /dev/null
|
||||||
|
|
||||||
|
echo -e "${GREEN}${xName2} is removed successfully!${NC}"
|
||||||
|
echo -e "${GREEN}${explorerName2} is removed successfully!${NC}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Stop service and disable booting start.
|
# Stop service and disable booting start.
|
||||||
clean_service
|
clean_service
|
||||||
# Remove binary file and links
|
# Remove binary file and links
|
||||||
|
@ -323,4 +333,7 @@ if [ "$osType" = "Darwin" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${GREEN}${productName2} is removed successfully!${NC}"
|
echo -e "${GREEN}${productName2} is removed successfully!${NC}"
|
||||||
echo
|
if [ "$verMode" == "cluster" ]; then
|
||||||
|
uninstall_taosx
|
||||||
|
fi
|
||||||
|
echo
|
Loading…
Reference in New Issue