mirror of
https://github.com/angristan/openvpn-install.git
synced 2025-12-16 00:47:02 +01:00
fix: allow reusing revoked client names (#1185)
Close https://github.com/angristan/openvpn-install/pull/680, close https://github.com/angristan/openvpn-install/issues/652, close https://github.com/angristan/openvpn-install/issues/1024, close https://github.com/angristan/openvpn-install/issues/746 Co-authored-by: Stanislas <git@slange.me>
This commit is contained in:
@@ -1510,8 +1510,8 @@ function newClient() {
|
|||||||
read -rp "Select an option [1-2]: " -e -i 1 PASS
|
read -rp "Select an option [1-2]: " -e -i 1 PASS
|
||||||
done
|
done
|
||||||
|
|
||||||
CLIENTEXISTS=$(tail -n +2 /etc/openvpn/easy-rsa/pki/index.txt | grep -c -E "/CN=$CLIENT\$")
|
CLIENTEXISTS=$(tail -n +2 /etc/openvpn/easy-rsa/pki/index.txt | grep -E "^V" | grep -c -E "/CN=$CLIENT\$")
|
||||||
if [[ $CLIENTEXISTS == '1' ]]; then
|
if [[ $CLIENTEXISTS != '0' ]]; then
|
||||||
log_error "The specified client CN was already found in easy-rsa, please choose another name."
|
log_error "The specified client CN was already found in easy-rsa, please choose another name."
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user