From: Thierry Parmentelat Date: Tue, 9 Apr 2019 13:34:49 +0000 (+0200) Subject: the apache 2.2/2.4 compat layer was broken because of apachectl not behaving like... X-Git-Tag: myplc-7.1-0~10 X-Git-Url: http://git.onelab.eu/?p=myplc.git;a=commitdiff_plain;h=fc89f99ce6d734002d59c3053e21c0a874264cb5 the apache 2.2/2.4 compat layer was broken because of apachectl not behaving like it used to --- 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