reorganize IS_APACHEMUNIN

This commit is contained in:
Jérémy Lecour 2019-03-22 18:16:53 +01:00 committed by Jérémy Lecour
parent 3353096ebe
commit d51c64d410

View file

@ -437,20 +437,20 @@ if is_debian; then
fi fi
if [ "$IS_APACHEMUNIN" = 1 ]; then if [ "$IS_APACHEMUNIN" = 1 ]; then
if is_debian_stretch; then if test -e /etc/apache2/apache2.conf; then
if test -e /etc/apache2/apache2.conf; then if is_debian_stretch; then
(test -h /etc/apache2/mods-enabled/status.load \ { test -h /etc/apache2/mods-enabled/status.load \
&& test -h /etc/munin/plugins/apache_accesses \ && test -h /etc/munin/plugins/apache_accesses \
&& test -h /etc/munin/plugins/apache_processes \ && test -h /etc/munin/plugins/apache_processes \
&& test -h /etc/munin/plugins/apache_volume) \ && test -h /etc/munin/plugins/apache_volume; } \
|| failed "IS_APACHEMUNIN" "mising munin plugins for Apache" || failed "IS_APACHEMUNIN" "mising munin plugins for Apache"
fi else
else pattern="/server-status-[[:alnum:]]{4,}"
if test -e /etc/apache2/apache2.conf; then { grep -q -s -E "^env.url.*${pattern}" /etc/munin/plugin-conf.d/munin-node \
(grep --quiet --no-messages --extended-regexp "^env.url.*/server-status-[[:alnum:]]{4,}" /etc/munin/plugin-conf.d/munin-node \ && { grep -q -s -E "${pattern}" /etc/apache2/apache2.conf \
&& (grep --quiet --no-messages --extended-regexp "/server-status-[[:alnum:]]{4,}" /etc/apache2/apache2.conf \ || grep -q -s -E "${pattern}" /etc/apache2/mods-enabled/status.conf;
|| grep --quiet --no-messages --extended-regexp "/server-status-[[:alnum:]]{4,}" /etc/apache2/mods-enabled/status.conf)) \ };
|| failed "IS_APACHEMUNIN" "server status is not properly configured" } || failed "IS_APACHEMUNIN" "server status is not properly configured"
fi fi
fi fi
fi fi