From d62acb67e10ffcadbca28dcae35f42e265de11a3 Mon Sep 17 00:00:00 2001 From: randomshell <43271778+randomshell@users.noreply.github.com> Date: Fri, 14 Sep 2018 15:41:03 +0200 Subject: [PATCH] Use variable for EasyRSA version --- openvpn-install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index c4ffd03..b203997 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -85,12 +85,13 @@ function getNIC () { } function installEasyRsa () { - wget -O ~/EasyRSA-3.0.4.tgz https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.4/EasyRSA-3.0.4.tgz - tar xzf ~/EasyRSA-3.0.4.tgz -C ~/ - mv ~/EasyRSA-3.0.4/ /etc/openvpn/ - mv /etc/openvpn/EasyRSA-3.0.4/ /etc/openvpn/easy-rsa/ + local version='3.0.4' + wget -O ~/EasyRSA-$version.tgz https://github.com/OpenVPN/easy-rsa/releases/download/v$version/EasyRSA-$version.tgz + tar xzf ~/EasyRSA-$version.tgz -C ~/ + mv ~/EasyRSA-$version/ /etc/openvpn/ + mv /etc/openvpn/EasyRSA-$version/ /etc/openvpn/easy-rsa/ chown -R root:root /etc/openvpn/easy-rsa/ - rm -f ~/EasyRSA-3.0.4.tgz + rm -f ~/EasyRSA-$version.tgz } function newClient () {