diff --git a/src/freedombone-app-vpn b/src/freedombone-app-vpn index 98bd9874..95a4eecd 100755 --- a/src/freedombone-app-vpn +++ b/src/freedombone-app-vpn @@ -238,7 +238,9 @@ function install_vpn { sed -i "s|export KEY_EMAIL.*|export KEY_EMAIL=\"$MY_EMAIL_ADDRESS\"|g" /etc/openvpn/easy-rsa/vars sed -i "s|export KEY_OU=.*|export KEY_OU=\"MoonUnit\"|g" /etc/openvpn/easy-rsa/vars sed -i "s|export KEY_NAME.*|export KEY_NAME=\"$OPENVPN_SERVER_NAME\"|g" /etc/openvpn/easy-rsa/vars - openssl dhparam -out /etc/openvpn/dh2048.pem 2048 + if [ ! -f /etc/openvpn/dh2048.pem ]; then + openssl dhparam -out /etc/openvpn/dh2048.pem 2048 + fi cd /etc/openvpn/easy-rsa . ./vars ./clean-all