#!/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 }