We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65f4885 commit 3c9580bCopy full SHA for 3c9580b
openvpn-install.sh
@@ -1510,8 +1510,8 @@ function newClient() {
1510
read -rp "Select an option [1-2]: " -e -i 1 PASS
1511
done
1512
1513
- CLIENTEXISTS=$(tail -n +2 /etc/openvpn/easy-rsa/pki/index.txt | grep -c -E "/CN=$CLIENT\$")
1514
- if [[ $CLIENTEXISTS == '1' ]]; then
+ CLIENTEXISTS=$(tail -n +2 /etc/openvpn/easy-rsa/pki/index.txt | grep -E "^V" | grep -c -E "/CN=$CLIENT\$")
+ if [[ $CLIENTEXISTS != '0' ]]; then
1515
log_error "The specified client CN was already found in easy-rsa, please choose another name."
1516
exit
1517
else
0 commit comments