Only generate dhparams if needed
This commit is contained in:
parent
334dbce583
commit
190e37043d
|
@ -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_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_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
|
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
|
cd /etc/openvpn/easy-rsa
|
||||||
. ./vars
|
. ./vars
|
||||||
./clean-all
|
./clean-all
|
||||||
|
|
Loading…
Reference in New Issue