Fix easy-rsa old version removal

The removal of an old version of easy-rsa should only happen if OpenVPN is being installed for the first time.
This commit is contained in:
John E 2020-04-25 17:40:36 -07:00 committed by GitHub
parent 5805cc03b2
commit e8074a485d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -662,6 +662,7 @@ function installOpenVPN () {
# Install required dependencies and upgrade the system
pacman --needed --noconfirm -Syu openvpn iptables openssl wget ca-certificates curl
fi
# An old version of easy-rsa was available by default in some openvpn packages
if [[ -d /etc/openvpn/easy-rsa/ ]]; then
rm -rf /etc/openvpn/easy-rsa/
fi
@ -674,11 +675,6 @@ function installOpenVPN () {
NOGROUP=nobody
fi
# An old version of easy-rsa was available by default in some openvpn packages
if [[ -d /etc/openvpn/easy-rsa/ ]]; then
rm -rf /etc/openvpn/easy-rsa/
fi
# Install the latest version of easy-rsa from source, if not already
# installed.
if [[ ! -d /etc/openvpn/easy-rsa/ ]]; then