diff --git a/openvpn-install.sh b/openvpn-install.sh index fb00722..317f41b 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -71,7 +71,12 @@ if [[ -e /etc/openvpn/server.conf ]]; then echo "Please, use one word only, no special characters." read -p "Client name: " -e CLIENT 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 newclient "$CLIENT" echo