Skip to content

Commit

Permalink
Update trojan_wp.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
atrandys committed Apr 3, 2020
1 parent 3273bf9 commit d806dcb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions trojan_wp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,6 @@ if [ -n "$Port443" ]; then
red "============================================================="
exit 1
fi
CHECK=$(grep SELINUX= /etc/selinux/config | grep -v "#")
if [ "$CHECK" != "SELINUX=disabled" ]; then
green "检测到SELinux开启状态,添加放行80/443端口规则"
$systemPackage install -y policycoreutils-python >/dev/null 2>&1
semanage port -m -t http_port_t -p tcp 80
semanage port -m -t http_port_t -p tcp 443
fi
if [ "$release" == "centos" ]; then
if [ -n "$(grep ' 6\.' /etc/redhat-release)" ] ;then
red "==============="
Expand All @@ -259,6 +252,13 @@ if [ "$release" == "centos" ]; then
red "==============="
exit
fi
CHECK=$(grep SELINUX= /etc/selinux/config | grep -v "#")
if [ "$CHECK" != "SELINUX=disabled" ]; then
green "检测到SELinux开启状态,添加放行80/443端口规则"
yum install -y policycoreutils-python >/dev/null 2>&1
semanage port -m -t http_port_t -p tcp 80
semanage port -m -t http_port_t -p tcp 443
fi
firewall_status=`firewall-cmd --state`
if [ "$firewall_status" == "running" ]; then
green "检测到firewalld开启状态,添加放行80/443端口规则"
Expand Down

0 comments on commit d806dcb

Please sign in to comment.