mirror of
https://github.com/angristan/openvpn-install.git
synced 2024-12-04 06:25:33 +01:00
refactor(install): simplify easy-rsa install process
This commit is contained in:
parent
529d365693
commit
0e961a2e6b
@ -678,16 +678,13 @@ function installOpenVPN() {
|
|||||||
NOGROUP=nobody
|
NOGROUP=nobody
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install the latest version of easy-rsa from source, if not already
|
# Install the latest version of easy-rsa from source, if not already installed.
|
||||||
# installed.
|
|
||||||
if [[ ! -d /etc/openvpn/easy-rsa/ ]]; then
|
if [[ ! -d /etc/openvpn/easy-rsa/ ]]; then
|
||||||
local version="3.0.7"
|
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
|
wget -O ~/easy-rsa.tgz https://github.com/OpenVPN/easy-rsa/releases/download/v${version}/EasyRSA-${version}.tgz
|
||||||
tar xzf ~/EasyRSA-unix-v${version}.tgz -C ~/
|
mkdir /etc/openvpn/easy-rsa
|
||||||
mkdir -p /etc/openvpn/easy-rsa
|
tar xzf ~/easy-rsa.tgz --strip-components=1 --directory /etc/openvpn/easy-rsa
|
||||||
mv ~/EasyRSA-v${version}/* /etc/openvpn/easy-rsa/
|
rm -f ~/easy-rsa.tgz
|
||||||
chown -R root:root /etc/openvpn/easy-rsa/
|
|
||||||
rm -f ~/EasyRSA-unix-v${version}.tgz
|
|
||||||
|
|
||||||
cd /etc/openvpn/easy-rsa/ || return
|
cd /etc/openvpn/easy-rsa/ || return
|
||||||
case $CERT_TYPE in
|
case $CERT_TYPE in
|
||||||
|
Loading…
Reference in New Issue
Block a user