diff --git a/openvpn-install.sh b/openvpn-install.sh index b39e795..c5136c8 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -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/