From 0e961a2e6b362574c705d00b121fbecad4d1de83 Mon Sep 17 00:00:00 2001 From: Stanislas Lange Date: Mon, 27 Apr 2020 19:20:40 +0200 Subject: [PATCH] refactor(install): simplify easy-rsa install process --- openvpn-install.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index 9ca427b..20be0af 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -678,16 +678,13 @@ function installOpenVPN() { NOGROUP=nobody fi - # Install the latest version of easy-rsa from source, if not already - # installed. + # Install the latest version of easy-rsa from source, if not already installed. if [[ ! -d /etc/openvpn/easy-rsa/ ]]; then local version="3.0.7" - wget -O ~/EasyRSA-unix-v${version}.tgz https://github.com/OpenVPN/easy-rsa/releases/download/v${version}/EasyRSA-${version}.tgz - tar xzf ~/EasyRSA-unix-v${version}.tgz -C ~/ - mkdir -p /etc/openvpn/easy-rsa - mv ~/EasyRSA-v${version}/* /etc/openvpn/easy-rsa/ - chown -R root:root /etc/openvpn/easy-rsa/ - rm -f ~/EasyRSA-unix-v${version}.tgz + wget -O ~/easy-rsa.tgz https://github.com/OpenVPN/easy-rsa/releases/download/v${version}/EasyRSA-${version}.tgz + mkdir /etc/openvpn/easy-rsa + tar xzf ~/easy-rsa.tgz --strip-components=1 --directory /etc/openvpn/easy-rsa + rm -f ~/easy-rsa.tgz cd /etc/openvpn/easy-rsa/ || return case $CERT_TYPE in