mirror of
https://github.com/Nyr/openvpn-install.git
synced 2024-11-24 05:56:08 +03:00
Check if client name is empty or contains spaces
This commit is contained in:
parent
b6f0c42b5b
commit
e553b5e7bd
@ -84,8 +84,10 @@ if [[ -e /etc/openvpn/server.conf ]]; then
|
|||||||
1)
|
1)
|
||||||
echo ""
|
echo ""
|
||||||
echo "Tell me a name for the client cert"
|
echo "Tell me a name for the client cert"
|
||||||
echo "Please, use one word only, no special characters"
|
while [[ "$CLIENT" =~ ' ' || "$CLIENT" == '' ]]; do
|
||||||
read -p "Client name: " -e -i client CLIENT
|
echo "Please, use one word only, no special characters"
|
||||||
|
read -p "Client name: " -e -i client CLIENT
|
||||||
|
done
|
||||||
cd /etc/openvpn/easy-rsa/
|
cd /etc/openvpn/easy-rsa/
|
||||||
./easyrsa build-client-full $CLIENT nopass
|
./easyrsa build-client-full $CLIENT nopass
|
||||||
# Generates the custom client.ovpn
|
# Generates the custom client.ovpn
|
||||||
|
Loading…
Reference in New Issue
Block a user