Remove not necessary code

The deletion of issued files is handled by `easy-rsa`.
See function `move_revoked()` f0129cfe62/easyrsa3/easyrsa (L1050)
This commit is contained in:
randomshell 2020-04-02 19:31:27 +00:00 committed by GitHub
parent e123635e7c
commit d44f879849
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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