Solve can not add the same client after revokeClient

This commit is contained in:
Jackie Lee 2022-09-02 18:11:45 +08:00 committed by GitHub
parent 4553dd9c21
commit c419909f70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1182,6 +1182,7 @@ function revokeClient() {
find /home/ -maxdepth 2 -name "$CLIENT.ovpn" -delete
rm -f "/root/$CLIENT.ovpn"
sed -i "/^$CLIENT,.*/d" /etc/openvpn/ipp.txt
sed -i "/CN=$CLIENT/d" /etc/openvpn/easy-rsa/pki/index.txt
cp /etc/openvpn/easy-rsa/pki/index.txt{,.bk}
echo ""