diff --git a/src/freedombone-app-vpn b/src/freedombone-app-vpn index 6d38347b..07f3e6d6 100755 --- a/src/freedombone-app-vpn +++ b/src/freedombone-app-vpn @@ -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