avoid removing taosx and taos-explorer while uninstall taosd

This commit is contained in:
Ping Xiao 2023-08-09 18:35:41 +08:00
parent 1d649bccb6
commit 9d698277d6
1 changed files with 21 additions and 21 deletions

View File

@ -123,8 +123,8 @@ function clean_bin() {
${csudo}rm -f ${bin_link_dir}/set_core || : ${csudo}rm -f ${bin_link_dir}/set_core || :
${csudo}rm -f ${bin_link_dir}/TDinsight.sh || : ${csudo}rm -f ${bin_link_dir}/TDinsight.sh || :
${csudo}rm -f ${bin_link_dir}/${keeperName2} || : ${csudo}rm -f ${bin_link_dir}/${keeperName2} || :
${csudo}rm -f ${bin_link_dir}/${xName2} || : # ${csudo}rm -f ${bin_link_dir}/${xName2} || :
${csudo}rm -f ${bin_link_dir}/${explorerName2} || : # ${csudo}rm -f ${bin_link_dir}/${explorerName2} || :
if [ "$verMode" == "cluster" ] && [ "$clientName" != "$clientName2" ]; then if [ "$verMode" == "cluster" ] && [ "$clientName" != "$clientName2" ]; then
${csudo}rm -f ${bin_link_dir}/${clientName2} || : ${csudo}rm -f ${bin_link_dir}/${clientName2} || :
@ -194,26 +194,26 @@ function clean_service_on_systemd() {
fi fi
${csudo}systemctl disable ${tarbitrator_service_name} &>/dev/null || echo &>/dev/null ${csudo}systemctl disable ${tarbitrator_service_name} &>/dev/null || echo &>/dev/null
x_service_config="${service_config_dir}/${xName2}.service" # x_service_config="${service_config_dir}/${xName2}.service"
if [ -e "$x_service_config" ]; then # if [ -e "$x_service_config" ]; then
if systemctl is-active --quiet ${xName2}; then # if systemctl is-active --quiet ${xName2}; then
echo "${productName2} ${xName2} is running, stopping it..." # echo "${productName2} ${xName2} is running, stopping it..."
${csudo}systemctl stop ${xName2} &>/dev/null || echo &>/dev/null # ${csudo}systemctl stop ${xName2} &>/dev/null || echo &>/dev/null
fi # fi
${csudo}systemctl disable ${xName2} &>/dev/null || echo &>/dev/null # ${csudo}systemctl disable ${xName2} &>/dev/null || echo &>/dev/null
${csudo}rm -f ${x_service_config} # ${csudo}rm -f ${x_service_config}
fi # fi
explorer_service_config="${service_config_dir}/${explorerName2}.service" # explorer_service_config="${service_config_dir}/${explorerName2}.service"
if [ -e "$explorer_service_config" ]; then # if [ -e "$explorer_service_config" ]; then
if systemctl is-active --quiet ${explorerName2}; then # if systemctl is-active --quiet ${explorerName2}; then
echo "${productName2} ${explorerName2} is running, stopping it..." # echo "${productName2} ${explorerName2} is running, stopping it..."
${csudo}systemctl stop ${explorerName2} &>/dev/null || echo &>/dev/null # ${csudo}systemctl stop ${explorerName2} &>/dev/null || echo &>/dev/null
fi # fi
${csudo}systemctl disable ${explorerName2} &>/dev/null || echo &>/dev/null # ${csudo}systemctl disable ${explorerName2} &>/dev/null || echo &>/dev/null
${csudo}rm -f ${explorer_service_config} # ${csudo}rm -f ${explorer_service_config}
${csudo}rm -f /etc/${clientName2}/explorer.toml # ${csudo}rm -f /etc/${clientName2}/explorer.toml
fi # fi
} }
function clean_service_on_sysvinit() { function clean_service_on_sysvinit() {