From b3b01aac8a47bd13653b6aa56a698abe26b31229 Mon Sep 17 00:00:00 2001 From: Christian Berkman Date: Mon, 4 Jun 2018 15:07:47 +0300 Subject: [PATCH] Ask user if passphrase should be set for config file, default no --- openvpn-install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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