From a6e2481f50b4b13b97f992b80a3d7c34893e0f80 Mon Sep 17 00:00:00 2001 From: Angristan Date: Sun, 17 Sep 2017 17:34:13 +0200 Subject: [PATCH] Add 2.4 repo for Ubuntu 16.04 + some cleanup --- openvpn-install.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index 3e881db..a25d83f 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -471,27 +471,30 @@ else echo "deb http://build.openvpn.net/debian/openvpn/stable wheezy main" > /etc/apt/sources.list.d/openvpn.list wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add - apt-get update - fi # Debian 8 - if [[ "$VERSION_ID" = 'VERSION_ID="8"' ]]; then + elif [[ "$VERSION_ID" = 'VERSION_ID="8"' ]]; then echo "deb http://build.openvpn.net/debian/openvpn/stable jessie main" > /etc/apt/sources.list.d/openvpn.list wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add - apt update - fi # Ubuntu 12.04 - if [[ "$VERSION_ID" = 'VERSION_ID="12.04"' ]]; then + elif [[ "$VERSION_ID" = 'VERSION_ID="12.04"' ]]; then echo "deb http://build.openvpn.net/debian/openvpn/stable precise main" > /etc/apt/sources.list.d/openvpn.list wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add - apt-get update - fi # Ubuntu 14.04 - if [[ "$VERSION_ID" = 'VERSION_ID="14.04"' ]]; then + elif [[ "$VERSION_ID" = 'VERSION_ID="14.04"' ]]; then echo "deb http://build.openvpn.net/debian/openvpn/stable trusty main" > /etc/apt/sources.list.d/openvpn.list wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add - apt-get update + # Ubuntu 16.04 + elif [[ "$VERSION_ID" = 'VERSION_ID="16.04"' ]]; then + echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn.list + wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add - + apt-get update fi - # Ubuntu >= 16.04 and Debian > 8 have OpenVPN > 2.3.3 without the need of a third party repository. + # Ubuntu >= 17.04 and Debian > 9 have OpenVPN 2.4 without the need of a third party repository. # The we install OpenVPN + apt-get update apt-get install openvpn iptables openssl wget ca-certificates curl -y elif [[ "$OS" = 'centos' ]]; then yum install epel-release -y