diff --git a/src/freedombone-app-vpn b/src/freedombone-app-vpn index 5285c22a..6147a86c 100755 --- a/src/freedombone-app-vpn +++ b/src/freedombone-app-vpn @@ -170,10 +170,22 @@ y echo $'VPN user cert not generated' exit 783528 fi + user_cert=$(cat /etc/openvpn/easy-rsa/keys/$username.crt) + if [ ${#user_cert} -lt 10 ]; then + cat /etc/openvpn/easy-rsa/keys/$username.crt + echo $'User cert generation failed' + exit 634659 + fi if [ ! -f /etc/openvpn/easy-rsa/keys/$username.key ]; then echo $'VPN user key not generated' exit 682523 fi + user_key=$(cat /etc/openvpn/easy-rsa/keys/$username.key) + if [ ${#user_key} -lt 10 ]; then + cat /etc/openvpn/easy-rsa/keys/$username.key + echo $'User key generation failed' + exit 285838 + fi user_vpn_cert_file=/home/$username/$OPENVPN_KEY_FILENAME