Use variable for EasyRSA version

This commit is contained in:
randomshell 2018-09-14 15:41:03 +02:00
parent e8352c40a4
commit d62acb67e1

View file

@ -85,12 +85,13 @@ function getNIC () {
} }
function installEasyRsa () { 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 local version='3.0.4'
tar xzf ~/EasyRSA-3.0.4.tgz -C ~/ wget -O ~/EasyRSA-$version.tgz https://github.com/OpenVPN/easy-rsa/releases/download/v$version/EasyRSA-$version.tgz
mv ~/EasyRSA-3.0.4/ /etc/openvpn/ tar xzf ~/EasyRSA-$version.tgz -C ~/
mv /etc/openvpn/EasyRSA-3.0.4/ /etc/openvpn/easy-rsa/ mv ~/EasyRSA-$version/ /etc/openvpn/
mv /etc/openvpn/EasyRSA-$version/ /etc/openvpn/easy-rsa/
chown -R root:root /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 () { function newClient () {