Skip to content
Snippets Groups Projects
Commit 190e3704 authored by Bob Mottram's avatar Bob Mottram
Browse files

Only generate dhparams if needed

parent 334dbce5
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment