提升创建用户的稳定性

This commit is contained in:
even 2022-02-18 14:08:52 +08:00
parent 249ded3db6
commit 7885306ce0

View File

@ -1075,7 +1075,7 @@ function newClient() {
done done
CLIENTEXISTS=$(tail -n +2 /etc/openvpn/easy-rsa/pki/index.txt | grep -E "^V" | 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
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, please choose another name."
exit exit