Merge 106a2ce3c9e19b49b6997dd71b4fa5b8cba0c65b into 7e32f6ae8373fe66e657cb693518c45768d0ea6e

This commit is contained in:
Cezar Lungu 2025-03-16 09:53:40 +03:30 committed by GitHub
commit 9c624e8b75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1115,11 +1115,10 @@ 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 -c -E "^V.*/CN=$CLIENT\$")
if [[ $CLIENTEXISTS == '1' ]]; then if [[ $CLIENTEXISTS == '1' ]]; then
echo "" echo ""
echo "The specified client CN was already found in easy-rsa, please choose another name." echo "The specified client CN was already found in easy-rsa."
exit
else else
cd /etc/openvpn/easy-rsa/ || return cd /etc/openvpn/easy-rsa/ || return
case $PASS in case $PASS in