From fc89f99ce6d734002d59c3053e21c0a874264cb5 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 9 Apr 2019 15:34:49 +0200 Subject: [PATCH] the apache 2.2/2.4 compat layer was broken because of apachectl not behaving like it used to --- plc.d/functions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plc.d/functions b/plc.d/functions index 161da9e..340e89d 100644 --- a/plc.d/functions +++ b/plc.d/functions @@ -171,7 +171,9 @@ function plc_reload () { # function apache_newauth () { - apache_version=$(apachectl -V 2> /dev/null | grep 'Server version' | cut -d ' ' -f3 | sed -e 's,^.*/,,') + # somehow in 2019 apachectl stopped answering the -V option + # apache_version=$(apachectl -V 2> /dev/null | grep 'Server version' | cut -d ' ' -f3 | sed -e 's,^.*/,,') + apache_version=$(rpm -q --queryformat "%{VERSION}" httpd) apache_major=$(echo $apache_version | cut -d. -f1) apache_minor=$(echo $apache_version | cut -d. -f2) test "$apache_minor" -ge 4 -- 2.43.0