From ad9a15827f250d44d7017cbf7bc928068f8ec3a7 Mon Sep 17 00:00:00 2001 From: Bruno TATU Date: Tue, 21 Nov 2017 14:45:50 +0100 Subject: [PATCH] evoacme: invert conditions in sed_cert_path_XXX() --- evoacme/files/evoacme.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evoacme/files/evoacme.sh b/evoacme/files/evoacme.sh index 7875d889..57f1c74d 100755 --- a/evoacme/files/evoacme.sh +++ b/evoacme/files/evoacme.sh @@ -50,7 +50,7 @@ sed_cert_path_for_apache() { local search="^SSLCertificateFile.*$" local replace="SSLCertificateFile ${cert_path}" - if ! $(grep -qE "${search}" "${vhost_full_path}"); then + if $(grep -qE "${search}" "${vhost_full_path}"); then [ -w "${vhost_full_path}" ] || error "File ${vhost_full_path} is not writable" sed -i "s~${search}~${replace}~" "${vhost_full_path}" @@ -68,7 +68,7 @@ sed_cert_path_for_nginx() { local search="^ssl_certificate[^_].*$" local replace="ssl_certificate ${cert_path};" - if ! $(grep -qE "${search}" "${vhost_full_path}"); then + if $(grep -qE "${search}" "${vhost_full_path}"); then [ -w "${vhost_full_path}" ] || error "File ${vhost_full_path} is not writable" sed -i "s~${search}~${replace}~" "${vhost_full_path}"