From d44f8798497483c4da374bd5722a39181713bd7e Mon Sep 17 00:00:00 2001 From: randomshell <43271778+randomshell@users.noreply.github.com> Date: Thu, 2 Apr 2020 19:31:27 +0000 Subject: [PATCH] Remove not necessary code The deletion of issued files is handled by `easy-rsa`. See function `move_revoked()` https://github.com/OpenVPN/easy-rsa/blob/f0129cfe6222820a85db2d394ab73d3c7759c5be/easyrsa3/easyrsa#L1050 --- openvpn-install.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index a9f1a03..23399d2 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -1111,13 +1111,10 @@ function revokeClient () { cd /etc/openvpn/easy-rsa/ || return ./easyrsa --batch revoke "$CLIENT" EASYRSA_CRL_DAYS=3650 ./easyrsa gen-crl - # Cleanup - rm -f "pki/reqs/$CLIENT.req" - rm -f "pki/private/$CLIENT.key" - rm -f "pki/issued/$CLIENT.crt" rm -f /etc/openvpn/crl.pem cp /etc/openvpn/easy-rsa/pki/crl.pem /etc/openvpn/crl.pem chmod 644 /etc/openvpn/crl.pem + # Cleanup find /home/ -maxdepth 2 -name "$CLIENT.ovpn" -delete rm -f "/root/$CLIENT.ovpn" sed -i "s|^$CLIENT,.*||" /etc/openvpn/ipp.txt