mirror of
https://github.com/Nyr/openvpn-install.git
synced 2024-12-01 09:26:09 +03:00
Add support for RedHat 8.x
This commit is contained in:
parent
94c94bbbc9
commit
0a78c167f3
@ -30,9 +30,13 @@ elif [[ -e /etc/debian_version ]]; then
|
||||
os="debian"
|
||||
os_version=$(grep -oE '[0-9]+' /etc/debian_version | head -1)
|
||||
group_name="nogroup"
|
||||
elif [[ -e /etc/almalinux-release || -e /etc/rocky-release || -e /etc/centos-release ]]; then
|
||||
elif [[ -e /etc/almalinux-release || -e /etc/rocky-release || -e /etc/centos-release || -e /etc/redhat-release ]]; then
|
||||
os="centos"
|
||||
os_version=$(grep -shoE '[0-9]+' /etc/almalinux-release /etc/rocky-release /etc/centos-release | head -1)
|
||||
os_version=$(grep -shoE '[0-9]+' /etc/almalinux-release /etc/rocky-release /etc/centos-release /etc/redhat-release | head -1)
|
||||
group_name="nobody"
|
||||
elif [[ -e /etc/redhat-release ]]; then
|
||||
os="redhat"
|
||||
os_version=$(grep -shoE '[0-9]+' /etc/redhat-release | head -1)
|
||||
group_name="nobody"
|
||||
elif [[ -e /etc/fedora-release ]]; then
|
||||
os="fedora"
|
||||
@ -62,6 +66,12 @@ This version of CentOS is too old and unsupported."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ "$os" == "RedHat" && "$os_version" -lt 7 ]]; then
|
||||
echo "RedHat 7 or higher is required to use this installer.
|
||||
This version of RedHat is too old and unsupported."
|
||||
exit
|
||||
fi
|
||||
|
||||
# Detect environments where $PATH does not include the sbin directories
|
||||
if ! grep -q sbin <<< "$PATH"; then
|
||||
echo '$PATH does not include sbin. Try using "su -" instead of "su".'
|
||||
@ -73,6 +83,13 @@ if [[ "$EUID" -ne 0 ]]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
if [[ "`sudo rpm -ql epel-release`" == "package epel-release is not installed" ]]; then
|
||||
echo "EPEL is not installed, please install EPEL"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
if [[ ! -e /dev/net/tun ]] || ! ( exec 7<>/dev/net/tun ) 2>/dev/null; then
|
||||
echo "The system does not have the TUN device available.
|
||||
TUN needs to be enabled before running this installer."
|
||||
|
Loading…
Reference in New Issue
Block a user