getclient: Do not autogenerate key

* Do not autogenerate a key if it does not exist.  Instead fail.
* Requires users to explicitly generate keys and prevents generating
  erroneous keys in the event of a typo.
This commit is contained in:
Kyle Manna 2014-07-10 09:53:24 -07:00
parent 76a230b3be
commit d36bb7ecba

View File

@ -10,7 +10,8 @@ source "$OPENVPN/ovpn_env.sh"
cn=$1
if [ ! -f "$EASYRSA_PKI/private/${cn}.key" ]; then
easyrsa build-server-full $cn nopass
echo "Unable to find ${cn}, please try again or generate the key first"
exit 1
fi
cat <<EOF