Use APT repo for Ubuntu 16.04

Ubuntu 16.04 has OpenVPN 2.3.10
This commit is contained in:
angristan 2018-09-23 12:47:52 +02:00
parent 21f15d9aef
commit e2906fd5e4
1 changed files with 6 additions and 1 deletions

View File

@ -514,7 +514,12 @@ function installOpenVPN () {
wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add -
apt-get update
fi
# Ubuntu >= 16.04 and Debian >= 9 have OpenVPN >= 2.4 without the need of a third party repository.
if [[ "$VERSION_ID" = "16.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
fi
# Ubuntu > 16.04 and Debian > 8 have OpenVPN >= 2.4 without the need of a third party repository.
apt-get install openvpn iptables openssl wget ca-certificates curl -y
elif [[ "$OS" = 'centos' ]]; then
yum install epel-release openvpn iptables openssl wget ca-certificates curl -y