Check if vpn dhparams get generated

This commit is contained in:
Bob Mottram 2017-09-27 14:23:32 +01:00
parent 5fac7b57ad
commit 9229d27db0
1 changed files with 7 additions and 1 deletions

View File

@ -549,8 +549,14 @@ function install_vpn {
# generate host keys
if [ ! -f /etc/openvpn/dh2048.pem ]; then
openssl dhparam -out /etc/openvpn/easy-rsa/keys/dh2048.pem 2048
openssl dhparam -out /etc/openvpn/dh2048.pem 2048
fi
if [ ! -f /etc/openvpn/dh2048.pem ]; then
echo $'vpn dhparams were not generated'
exit 73724523
fi
cp /etc/openvpn/dh2048.pem /etc/openvpn/easy-rsa/keys/dh2048.pem
cd /etc/openvpn/easy-rsa
. ./vars
./clean-all