正在显示
1 个修改的文件
包含
6 行增加
和
4 行删除
| @@ -39,10 +39,12 @@ if [[ `getenforce` != 'Disabled' ]]; then | @@ -39,10 +39,12 @@ if [[ `getenforce` != 'Disabled' ]]; then | ||
| 39 | echo -e "${RED} 重启系统:sudo reboot${BLACK}"; | 39 | echo -e "${RED} 重启系统:sudo reboot${BLACK}"; |
| 40 | fi | 40 | fi |
| 41 | 41 | ||
| 42 | -sudo /etc/init.d/iptables status >/dev/null 2>&1; | ||
| 43 | -if [[ $? -ne 3 ]]; then | ||
| 44 | - echo -e "${RED}请关闭防火墙:${BLACK}"; | ||
| 45 | - echo -e "${RED} sudo /etc/init.d/iptables stop${BLACK}"; | 42 | +if [[ -f /etc/init.d/iptables ]]; then |
| 43 | + sudo /etc/init.d/iptables status >/dev/null 2>&1; | ||
| 44 | + if [[ $? -ne 3 ]]; then | ||
| 45 | + echo -e "${RED}请关闭防火墙:${BLACK}"; | ||
| 46 | + echo -e "${RED} sudo /etc/init.d/iptables stop${BLACK}"; | ||
| 47 | + fi | ||
| 46 | fi | 48 | fi |
| 47 | 49 | ||
| 48 | echo -e "${GREEN}请在hosts中添加一行:${BLACK}" | 50 | echo -e "${GREEN}请在hosts中添加一行:${BLACK}" |
-
请 注册 或 登录 后发表评论