Add help message when choosing an invalid config

This commit is contained in:
Kristian Haugene
2020-11-04 00:10:23 +01:00
parent f1be375d3c
commit f27d47c121

View File

@@ -84,6 +84,9 @@ if [[ -z ${CHOSEN_OPENVPN_CONFIG} ]]; then
CHOSEN_OPENVPN_CONFIG="${VPN_PROVIDER_HOME}/${OPENVPN_CONFIG}.ovpn" CHOSEN_OPENVPN_CONFIG="${VPN_PROVIDER_HOME}/${OPENVPN_CONFIG}.ovpn"
else else
echo "Supplied config ${OPENVPN_CONFIG}.ovpn could not be found." echo "Supplied config ${OPENVPN_CONFIG}.ovpn could not be found."
echo "Your options for this provider are:"
ls "${VPN_PROVIDER_HOME}" | grep .ovpn
echo "NB: Remember to not specify .ovpn as part of the config name."
exit 1 # No longer fall back to default. The user chose a specific config - we should use it or fail. exit 1 # No longer fall back to default. The user chose a specific config - we should use it or fail.
fi fi
else else