Support setting of lzo compression (yes/no).

This commit is contained in:
2018-03-18 19:39:18 +01:00
parent 267cb8f1f5
commit 4bef4e3c0f
3 changed files with 90 additions and 18 deletions

View File

@@ -180,6 +180,13 @@ fi
[[ "${SERVER_CIPHER,,}" = "none" ]] && SERVER_CIPHER=""
if [[ -z "$LZO_COMPRESSION" ]]; then
LZO_COMPRESSION=true
elif $LZO_COMPRESSION ; then
LZO_COMPRESSION=true
else
LZO_COMPRESSION=false
fi
EASY_RSA_DIR="${OPENVPN_BASE_DIR}/easy-rsa"
@@ -505,7 +512,16 @@ cat <<EOF >> "$_client_conf_file" 2>> "$log_file"
# Enable compression on the VPN link.
# Don't enable this unless it is also
# enabled in the server config file.
;comp-lzo
EOF
if $LZO_COMPRESSION ; then
cat <<EOF >> ${_server_conf_file} 2>> "$log_file"
comp-lzo
EOF
fi
cat <<EOF >> ${_server_conf_file} 2>> "$log_file"
# Verbosity level.
# 0 -- quiet except for fatal errors.