Delete old client references in easy-rsa PKI index (#873)

This commit is contained in:
fabiogiorgione 2021-10-18 10:43:36 +02:00 committed by GitHub
parent 7d5c2d962d
commit 29deb4cfdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1186,6 +1186,8 @@ function revokeClient() {
find /home/ -maxdepth 2 -name "$CLIENT.ovpn" -delete
rm -f "/root/$CLIENT.ovpn"
sed -i "/^$CLIENT,.*/d" /etc/openvpn/ipp.txt
cp /etc/openvpn/easy-rsa/pki/index.txt{,.bk}
sed -i -e '/^[R]/d' /etc/openvpn/easy-rsa/pki/index.txt
echo ""
echo "Certificate for client $CLIENT revoked."