From 8b6c81f79e61656de5766e94f9c1f0ccf4f3bd82 Mon Sep 17 00:00:00 2001 From: Nyr Date: Thu, 21 Apr 2022 21:11:44 +0200 Subject: [PATCH] Ubuntu 22.04 support --- openvpn-install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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/