linux-tutorial/codes/linux/sys/stop-firewall.sh

24 lines
738 B
Bash
Raw Normal View History

2019-02-22 18:57:46 +08:00
#!/usr/bin/env bash
2019-10-24 22:00:00 +08:00
# ---------------------------------------------------------------------------------
# 控制台颜色
BLACK="\033[1;30m"
RED="\033[1;31m"
GREEN="\033[1;32m"
YELLOW="\033[1;33m"
BLUE="\033[1;34m"
PURPLE="\033[1;35m"
CYAN="\033[1;36m"
RESET="$(tput sgr0)"
# ---------------------------------------------------------------------------------
2019-02-22 18:57:46 +08:00
###################################################################################
2019-10-24 22:00:00 +08:00
# 关闭防火墙
2019-02-22 18:57:46 +08:00
# 参考https://www.cnblogs.com/moxiaoan/p/5683743.html
2019-05-07 14:29:16 +08:00
# @author: Zhang Peng
2019-02-22 18:57:46 +08:00
###################################################################################
systemctl stop firewalld
systemctl disable firewalld
2019-10-24 22:00:00 +08:00
printf "\n${GREEN}<<<<<<<< 已关闭防火墙${RESET}\n"