mirror of
https://github.com/angristan/openvpn-install.git
synced 2025-12-18 01:37:02 +01:00
fix: exit non-zero when client name exists (#1407)
Fixes https://github.com/angristan/openvpn-install/issues/1194
This commit is contained in:
@@ -3142,7 +3142,7 @@ function newClient() {
|
||||
CLIENTEXISTS=$(tail -n +2 /etc/openvpn/server/easy-rsa/pki/index.txt | grep -E "^V" | grep -c -E "/CN=$CLIENT\$")
|
||||
if [[ $CLIENTEXISTS != '0' ]]; then
|
||||
log_error "The specified client CN was already found in easy-rsa, please choose another name."
|
||||
exit
|
||||
exit 1
|
||||
else
|
||||
cd /etc/openvpn/server/easy-rsa/ || return
|
||||
log_info "Generating client certificate..."
|
||||
|
||||
Reference in New Issue
Block a user