#!/bin/bash

function StopFirewallReleated()
{
    systemctl stop netfilter-persistent.service
    systemctl disable netfilter-persistent.service

    systemctl stop firewalld
    systemctl disable firewalld

    systemctl stop ufw
    systemctl disable ufw


    systemctl stop systemd-resolved
    systemctl disable systemd-resolved

    echo "
nameserver 1.1.1.1
nameserver 8.8.8.8
nameserver 4.2.2.2" > /etc/resolv.conf

  iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -t raw -F
  ip6tables -F && ip6tables -t nat -F && ip6tables -t mangle -F && ip6tables -t raw -F
}



function RemoveOracleAgent()
{
    # 完全移除 oracle-cloud-agent
    snap remove oracle-cloud-agent
    snap remove oracle-cloud-agent-updater

    systemctl stop oracle-cloud-agent
    systemctl disable oracle-cloud-agent
    systemctl stop oracle-cloud-agent-updater
    systemctl disable oracle-cloud-agent-updater

}


