Files
shell-scripts/Public/lib/wdd-lib-clean.sh
2023-10-10 15:16:56 +08:00

36 lines
899 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
if [[ ! -f /root/wdd/lib/wdd-lib-log.sh ]]; then
wget https://oss-s1.107421.xyz/wdd-lib-log.sh -O /root/wdd/lib/wdd-lib-log.sh
fi
source /root/wdd/lib/wdd-lib-log.sh
CleanOracleAgent() {
FunctionStart
colorEchoBlue "准备清理 Oracle Agent的相关内容 "
snap info oracle-cloud-agent
snap stop oracle-cloud-agent
snap remove oracle-cloud-agent
for i in $(ls /lib/systemd/system/ | grep snapd | awk '{print$1}'); do
echo $i
systemctl stop $i
systemctl disable $i
done
rm -rf /root/snap
FunctionSuccess
FunctionEnd
}
CleanIpPersist() {
FunctionStart
colorEchoBlue "开始关闭 防火墙持久化存储 …………"
systemctl stop systemd-resolved.service && systemctl disable systemd-resolved.service
systemctl stop netfilter-persistent.service && systemctl disable netfilter-persistent.service
FunctionEnd
FunctionSuccess
}