#!/bin/bash # 判断是否存在ufw命令,存在则执行 if command -v ufw &> /dev/null then ufw disable fi # 如果是麒麟操作系统,执行以下命令 if [ -f /etc/kylin-release ]; then setstatus disable systemctl stop firewalld systemctl disable firewalld fi