create_key_config.sh: fix error concerning variable 'LZO_COMPRESSION'.

This commit is contained in:
Christoph 2018-09-22 01:44:50 +02:00
parent 851d476bfd
commit a780d87c57

View File

@ -183,10 +183,16 @@ fi
[[ "${SERVER_CIPHER,,}" = "" ]] && SERVER_CIPHER="BF-CBC"
if [[ -z "$LZO_COMPRESSION" ]]; then
LZO_COMPRESSION=true
elif [[ "${LZO_COMPRESSION,,}" = "yes" ]] ; then
LZO_COMPRESSION=true
elif [[ "${LZO_COMPRESSION,,}" = "no" ]] ; then
LZO_COMPRESSION=false
elif [[ "$LZO_COMPRESSION" != "true" ]] && [[ "$LZO_COMPRESSION" != "false" ]] ; then
fatal "Wrong value for variable 'LZO_COMPRESSION' (${LZO_COMPRESSION})"
elif ! $LZO_COMPRESSION ; then
LZO_COMPRESSION=false
elif $LZO_COMPRESSION ; then
LZO_COMPRESSION=true
else
LZO_COMPRESSION=false
fi
EASY_RSA_DIR="${OPENVPN_BASE_DIR}/easy-rsa"