1
0
mirror of https://github.com/Nyr/openvpn-install.git synced 2024-11-24 05:56:08 +03:00

Ask user if passphrase should be set for config file, default no

This commit is contained in:
Christian Berkman 2018-06-04 15:07:47 +03:00
parent 6061a29028
commit b3b01aac8a

View File

@ -71,7 +71,12 @@ if [[ -e /etc/openvpn/server.conf ]]; then
echo "Please, use one word only, no special characters." echo "Please, use one word only, no special characters."
read -p "Client name: " -e CLIENT read -p "Client name: " -e CLIENT
cd /etc/openvpn/easy-rsa/ cd /etc/openvpn/easy-rsa/
./easyrsa build-client-full $CLIENT nopass ./easyrsa build-client-full $CLIENT nopass\
# Ask to set a password for the configuration file
read -p "Do you want to set a passprashe for the configuration? [y/N]: " -e -i N SETPASS
if [[ "$SETPASS" = 'y' || "$SETPASS" = 'Y' ]]; then
./easyrsa set-rsa-pass $CLIENT
fi
# Generates the custom client.ovpn # Generates the custom client.ovpn
newclient "$CLIENT" newclient "$CLIENT"
echo echo