From a780d87c57d97b17e0d5b0fb3d319da94a925fce Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 22 Sep 2018 01:44:50 +0200 Subject: [PATCH] create_key_config.sh: fix error concerning variable 'LZO_COMPRESSION'. --- create_key_config.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/create_key_config.sh b/create_key_config.sh index d585c0d..a05e084 100755 --- a/create_key_config.sh +++ b/create_key_config.sh @@ -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"