diff --git a/openvpn-install.sh b/openvpn-install.sh index f374e79..bab1d8d 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -219,12 +219,9 @@ LimitNPROC=infinity" > /etc/systemd/system/openvpn-server@server.service.d/disab fi # Get easy-rsa easy_rsa_url='https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.7/EasyRSA-3.0.7.tgz' - wget -O ~/easyrsa.tgz "$easy_rsa_url" 2>/dev/null || curl -Lo ~/easyrsa.tgz "$easy_rsa_url" - tar xzf ~/easyrsa.tgz -C ~/ - mv ~/EasyRSA-3.0.7/ /etc/openvpn/server/ - mv /etc/openvpn/server/EasyRSA-3.0.7/ /etc/openvpn/server/easy-rsa/ + 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/ - rm -f ~/easyrsa.tgz cd /etc/openvpn/server/easy-rsa/ # Create the PKI, set up the CA and the server and client certificates ./easyrsa init-pki