Additional cert checks
This commit is contained in:
parent
dea56279e4
commit
31fdd2dd2b
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue