mirror of
https://github.com/Nyr/openvpn-install.git
synced 2025-04-09 04:02:08 +00:00
Add support for Rocky and Alma Linux
This commit is contained in:
parent
cb8730b621
commit
44e4c14a87
2 changed files with 22 additions and 3 deletions
|
@ -1,7 +1,8 @@
|
|||
**New: [wireguard-install](https://github.com/Nyr/wireguard-install) is also available.**
|
||||
|
||||
## openvpn-install
|
||||
OpenVPN [road warrior](http://en.wikipedia.org/wiki/Road_warrior_%28computing%29) installer for Ubuntu, Debian, CentOS and Fedora.
|
||||
OpenVPN [road warrior](http://en.wikipedia.org/wiki/Road_warrior_%28computing%29) installer for Ubuntu, Debian, CentOS, Fedora,
|
||||
Rocky Linux, and Alma Linux
|
||||
|
||||
This script will let you set up your own VPN server in no more than a minute, even if you haven't used OpenVPN before. It has been designed to be as unobtrusive and universal as possible.
|
||||
|
||||
|
|
|
@ -38,9 +38,17 @@ elif [[ -e /etc/fedora-release ]]; then
|
|||
os="fedora"
|
||||
os_version=$(grep -oE '[0-9]+' /etc/fedora-release | head -1)
|
||||
group_name="nobody"
|
||||
elif [[ -e /etc/os-release ]]; then
|
||||
os="rocky"
|
||||
os_version=$(grep -oE '[0-9]+' /etc/os-release | head -1)
|
||||
group_name="nobody"
|
||||
elif [[ -e /etc/os-release ]]; then
|
||||
os="almalinux"
|
||||
os_version=$(grep -oE '[0-9]+' /etc/os-release | head -1)
|
||||
group_name="nobody"
|
||||
else
|
||||
echo "This installer seems to be running on an unsupported distribution.
|
||||
Supported distributions are Ubuntu, Debian, CentOS, and Fedora."
|
||||
Supported distributions are Ubuntu, Debian, CentOS, Fedora, Rocky Linux, and Alma Linux."
|
||||
exit
|
||||
fi
|
||||
|
||||
|
@ -61,6 +69,16 @@ if [[ "$os" == "centos" && "$os_version" -lt 7 ]]; then
|
|||
This version of CentOS is too old and unsupported."
|
||||
exit
|
||||
fi
|
||||
if [[ "$os" == "rocky" && "$os_version" -lt 8 ]]; then
|
||||
echo "Rocky Linux 8 or higher is required to use this installer.
|
||||
This version of Rocky Linux is too old and unsupported."
|
||||
exit
|
||||
fi
|
||||
if [[ "$os" == "almalinux" && "$os_version" -lt 8 ]]; then
|
||||
echo "Alma Linux 8 or higher is required to use this installer.
|
||||
This version of Alma Linux is too old and unsupported."
|
||||
exit
|
||||
fi
|
||||
|
||||
# Detect environments where $PATH does not include the sbin directories
|
||||
if ! grep -q sbin <<< "$PATH"; then
|
||||
|
@ -217,7 +235,7 @@ LimitNPROC=infinity" > /etc/systemd/system/openvpn-server@server.service.d/disab
|
|||
if [[ "$os" = "debian" || "$os" = "ubuntu" ]]; then
|
||||
apt-get update
|
||||
apt-get install -y openvpn openssl ca-certificates $firewall
|
||||
elif [[ "$os" = "centos" ]]; then
|
||||
elif [[ "$os" = "centos" || "$os" = "rocky" || "$os" = "almalinux" ]]; then
|
||||
yum install -y epel-release
|
||||
yum install -y openvpn openssl ca-certificates tar $firewall
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue