Update openvpn-install.sh
This commit is contained in:
parent
20d7502cd4
commit
33fc90671a
@ -417,10 +417,12 @@ WantedBy=multi-user.target" >> /etc/systemd/system/openvpn-iptables.service
|
|||||||
if [[ "$os_version" -eq 7 ]]; then
|
if [[ "$os_version" -eq 7 ]]; then
|
||||||
# Centos 7
|
# Centos 7
|
||||||
yum install -y policycoreutils-python
|
yum install -y policycoreutils-python
|
||||||
else
|
elif [[ "$os" = "redhat" ]] && [[ "$os_version" -eq 7 ]]; then
|
||||||
# RHEL 8
|
|
||||||
wget https://access.cdn.redhat.com/content/origin/rpms/policycoreutils-python-utils/2.9/9.el8/fd431d51/policycoreutils-python-utils-2.9-9.el8.noarch.rpm
|
wget https://access.cdn.redhat.com/content/origin/rpms/policycoreutils-python-utils/2.9/9.el8/fd431d51/policycoreutils-python-utils-2.9-9.el8.noarch.rpm
|
||||||
dnf -y install policycoreutils-python-utils/2.9/9.el8/fd431d51/policycoreutils-python-utils-2.9-9.el8.noarch.rpm?
|
dnf -y install policycoreutils-python-utils/2.9/9.el8/fd431d51/policycoreutils-python-utils-2.9-9.el8.noarch.rpm
|
||||||
|
else
|
||||||
|
# Fedora
|
||||||
|
dnf -y install policycoreutils-python
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
semanage port -a -t openvpn_port_t -p "$protocol" "$port"
|
semanage port -a -t openvpn_port_t -p "$protocol" "$port"
|
||||||
@ -563,9 +565,11 @@ verb 3" > /etc/openvpn/server/client-common.txt
|
|||||||
rm -f /etc/sysctl.d/30-openvpn-forward.conf
|
rm -f /etc/sysctl.d/30-openvpn-forward.conf
|
||||||
if [[ "$os" = "debian" || "$os" = "ubuntu" ]]; then
|
if [[ "$os" = "debian" || "$os" = "ubuntu" ]]; then
|
||||||
apt-get remove --purge -y openvpn
|
apt-get remove --purge -y openvpn
|
||||||
else
|
elif [[ "$os" = "redhat" || "fedora" ]]; then
|
||||||
# Else, OS must be CentOS or Fedora
|
|
||||||
dnf remove -y openvpn
|
dnf remove -y openvpn
|
||||||
|
else
|
||||||
|
# Else, OS must be CentOS
|
||||||
|
yum remove -y openvpn
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
echo "OpenVPN removed!"
|
echo "OpenVPN removed!"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user