diff --git a/openvpn-install.sh b/openvpn-install.sh index a6abc69..1adbc0e 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -1075,7 +1075,7 @@ function newClient() { done 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 echo "" echo "The specified client CN was already found in easy-rsa, please choose another name." exit