From 107783e777a6248a9403bad2a8c07fc9b430e0f4 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Mon, 6 Dec 2021 11:06:53 +0800 Subject: [PATCH] [TD-11801]: rmtaos script to remove taosAdapter. (#8927) --- packaging/tools/remove.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packaging/tools/remove.sh b/packaging/tools/remove.sh index 6241dd9eab..7ace212e6a 100755 --- a/packaging/tools/remove.sh +++ b/packaging/tools/remove.sh @@ -27,6 +27,7 @@ install_nginxd_dir="/usr/local/nginxd" service_config_dir="/etc/systemd/system" taos_service_name="taosd" +taosadapter_service_name="taosadapter" tarbitrator_service_name="tarbitratord" nginx_service_name="nginxd" csudo="" @@ -112,14 +113,20 @@ function clean_log() { function clean_service_on_systemd() { taosd_service_config="${service_config_dir}/${taos_service_name}.service" - taosadapter_service_config="${service_config_dir}/taosadapter.service" if systemctl is-active --quiet ${taos_service_name}; then echo "TDengine taosd is running, stopping it..." ${csudo} systemctl stop ${taos_service_name} &> /dev/null || echo &> /dev/null fi ${csudo} systemctl disable ${taos_service_name} &> /dev/null || echo &> /dev/null ${csudo} rm -f ${taosd_service_config} - [ -f ${taosadapter_service_config} ] && ${sudo} rm -f ${taosadapter_service_config} + + taosadapter_service_config="${service_config_dir}/taosadapter.service" + if systemctl is-active --quiet ${taosadapter_service_name}; then + echo "TDengine taosAdapter is running, stopping it..." + ${csudo} systemctl stop ${taosadapter_service_name} &> /dev/null || echo &> /dev/null + fi + ${csudo} systemctl disable ${taosadapter_service_name} &> /dev/null || echo &> /dev/null + [ -f ${taosadapter_service_config} ] && ${csudo} rm -f ${taosadapter_service_config} tarbitratord_service_config="${service_config_dir}/${tarbitrator_service_name}.service" if systemctl is-active --quiet ${tarbitrator_service_name}; then -- GitLab