1
0
mirror of https://github.com/Nyr/openvpn-install.git synced 2024-11-23 13:36:08 +03:00

Ubuntu 22.04 support

This commit is contained in:
Nyr 2022-04-21 21:11:44 +02:00
parent 94c94bbbc9
commit 8b6c81f79e

View File

@ -236,7 +236,12 @@ LimitNPROC=infinity" > /etc/systemd/system/openvpn-server@server.service.d/disab
systemctl enable --now firewalld.service
fi
# Get easy-rsa
easy_rsa_url='https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.8/EasyRSA-3.0.8.tgz'
# The latest easy-rsa release is not yet compatible with Ubuntu 22.04
if [[ "$os" == "ubuntu" && "$os_version" -eq 2204 ]]; then
easy_rsa_url='https://wg.nyr.be/download/EasyRSA-bf19e79.tgz'
else
easy_rsa_url='https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.8/EasyRSA-3.0.8.tgz'
fi
mkdir -p /etc/openvpn/server/easy-rsa/
{ wget -qO- "$easy_rsa_url" 2>/dev/null || curl -sL "$easy_rsa_url" ; } | tar xz -C /etc/openvpn/server/easy-rsa/ --strip-components 1
chown -R root:root /etc/openvpn/server/easy-rsa/