From c419909f70b7cd6ca92f0c2c9a5fb1a20fa076a0 Mon Sep 17 00:00:00 2001 From: Jackie Lee Date: Fri, 2 Sep 2022 18:11:45 +0800 Subject: [PATCH] Solve can not add the same client after revokeClient --- openvpn-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/openvpn-install.sh b/openvpn-install.sh index 64d8ed0..51ea59b 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -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 ""