Server vpn cert check
This commit is contained in:
parent
31fdd2dd2b
commit
0a44e11e3f
|
@ -304,11 +304,18 @@ function install_vpn {
|
||||||
y
|
y
|
||||||
y
|
y
|
||||||
' | ./build-key-server $OPENVPN_SERVER_NAME
|
' | ./build-key-server $OPENVPN_SERVER_NAME
|
||||||
if [ ! -f /etc/openvpn/easy-rsa/keys/$OPENVPN_SERVER_NAME.crt ]; then
|
if [ ! -f /etc/openvpn/easy-rsa/keys/${OPENVPN_SERVER_NAME}.crt ]; then
|
||||||
echo $'OpenVPN crt not found'
|
echo $'OpenVPN crt not found'
|
||||||
exit 7823352
|
exit 7823352
|
||||||
fi
|
fi
|
||||||
if [ ! -f /etc/openvpn/easy-rsa/keys/$OPENVPN_SERVER_NAME.key ]; then
|
server_cert=$(cat /etc/openvpn/easy-rsa/keys/${OPENVPN_SERVER_NAME}.crt)
|
||||||
|
if [ ${#server_cert} -lt 10 ]; then
|
||||||
|
cat /etc/openvpn/easy-rsa/keys/${OPENVPN_SERVER_NAME}.crt
|
||||||
|
echo $'Server cert generation failed'
|
||||||
|
exit 3284682
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f /etc/openvpn/easy-rsa/keys/${OPENVPN_SERVER_NAME}.key ]; then
|
||||||
echo $'OpenVPN key not found'
|
echo $'OpenVPN key not found'
|
||||||
exit 6839436
|
exit 6839436
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue