Skip to content

Instantly share code, notes, and snippets.

@eallion
Created November 7, 2024 18:22
Show Gist options
  • Select an option

  • Save eallion/ebfd2b87424280d475e282400299ab40 to your computer and use it in GitHub Desktop.

Select an option

Save eallion/ebfd2b87424280d475e282400299ab40 to your computer and use it in GitHub Desktop.
腾讯云卸载云服务器监控组件
#! /bin/bash
# https://cloud.tencent.com/document/product/248/53584
sudo -i
systemctl stop tat_agent
systemctl disable tat_agent
rm -f /etc/systemd/system/tat_agent.service
/usr/local/qcloud/stargate/admin/uninstall.sh
/usr/local/qcloud/YunJing/uninst.sh
/usr/local/qcloud/monitor/barad/admin/uninstall.sh
rm -rf /usr/local/qcloud
rm -rf /usr/local/sa
rm -rf /usr/local/agenttools
rm -rf /usr/local/qcloud
process=(sap100 secu-tcs-agent sgagent64 barad_agent agent agentPlugInD pvdriver )
for i in ${process[@]}
do
for A in $(ps aux | grep $i | grep -v grep | awk '{print $2}')
do
kill -9 $A
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment