[Public] 重构通用脚本

This commit is contained in:
zeaslity
2023-09-28 14:42:16 +08:00
parent 1646ae1c3d
commit 65cb700649
17 changed files with 2481 additions and 29 deletions

View File

@@ -0,0 +1,38 @@
#!/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
. ./wdd-lib-log.sh
CleanOracleAgent() {
FunctionStart
colorEchoBlue "准备清理 Oracle Agent的相关内容 "
snap info oracle-cloud-agent
snap stop oracle-cloud-agent
snap remove oracle-cloud-agent
systemctl status snapd.service
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
}