get_revoked_keys.sh: Fix error in getting OpenVPN base directory.

This commit is contained in:
Christoph 2018-05-29 15:19:27 +02:00
parent 5e8a0f893b
commit fac83df879

View File

@ -166,8 +166,14 @@ else
warn "No configuration file 'conf_file' for OpenVON Service '$service_name' found.\n Loading defaults.."
fi
[[ -n "$KEY_DIR" ]] || KEY_DIR="/etc/openvpn/keys"
if [[ -z "$OPENVPN_BASE_DIR" ]]; then
fatal "OpenVPN base diretory not given!"
else
if [[ ! -d "$OPENVPN_BASE_DIR" ]]; then
fatal "OpenVPN base diretory not '$OPENVPN_BASE_DIR' not found!"
fi
fi
[[ -n "$KEY_DIR" ]] || KEY_DIR="${OPENVPN_BASE_DIR}/keys"
[[ -n "$CRL_PEM" ]] || CRL_PEM="${KEY_DIR}/crl.pem"
if [[ ! -d "$KEY_DIR" ]] ; then