代码拉取完成,页面将自动刷新
#!/bin/bash
#check linux Gentoo os
var=`lsb_release -a | grep Gentoo`
if [ -z "${var}" ]; then
var=`cat /etc/issue | grep Gentoo`
fi
if [ -d "/etc/runlevels/default" -a -n "${var}" ]; then
LINUX_RELEASE="GENTOO"
else
LINUX_RELEASE="OTHER"
fi
stop_aegis(){
killall -9 aegis_cli >/dev/null 2>&1
killall -9 aegis_update >/dev/null 2>&1
killall -9 AliYunDun >/dev/null 2>&1
killall -9 AliHids >/dev/null 2>&1
killall -9 AliHips >/dev/null 2>&1
killall -9 AliYunDunUpdate >/dev/null 2>&1
if [ -d /usr/local/aegis/aegis_debug ];then
if [ -d /usr/local/aegis/aegis_debug/tracing/instances/aegis ];then
echo > /usr/local/aegis/aegis_debug/tracing/instances/aegis/set_event
else
echo > /usr/local/aegis/aegis_debug/tracing/set_event
fi
fi
if [ -d /sys/kernel/debug ];then
if [ -d /sys/kernel/debug/tracing/instances/aegis ];then
echo > /sys/kernel/debug/tracing/instances/aegis/set_event
else
echo > /sys/kernel/debug/tracing/set_event
fi
fi
printf "%-40s %40s\n" "Stopping aegis" "[ OK ]"
}
remove_aegis(){
if [ -d /usr/local/aegis ];then
rm -rf /usr/local/aegis/aegis_client
rm -rf /usr/local/aegis/aegis_update
rm -rf /usr/local/aegis/alihids
fi
if [ -d /usr/local/aegis/aegis_debug ];then
umount /usr/local/aegis/aegis_debug
rm -rf /usr/local/aegis/aegis_debug
fi
}
uninstall_service() {
if [ -f "/etc/init.d/aegis" ]; then
/etc/init.d/aegis stop >/dev/null 2>&1
rm -f /etc/init.d/aegis
fi
if [ $LINUX_RELEASE = "GENTOO" ]; then
rc-update del aegis default 2>/dev/null
if [ -f "/etc/runlevels/default/aegis" ]; then
rm -f "/etc/runlevels/default/aegis" >/dev/null 2>&1;
fi
elif [ -f /etc/init.d/aegis ]; then
/etc/init.d/aegis uninstall
for ((var=2; var<=5; var++)) do
if [ -d "/etc/rc${var}.d/" ];then
rm -f "/etc/rc${var}.d/S80aegis"
elif [ -d "/etc/rc.d/rc${var}.d" ];then
rm -f "/etc/rc.d/rc${var}.d/S80aegis"
fi
done
fi
}
stop_aegis
uninstall_service
remove_aegis
printf "%-40s %40s\n" "Uninstalling aegis" "[ OK ]"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。