From be451b61a65a3fd2ca0df8643d9326d823f82994 Mon Sep 17 00:00:00 2001 From: Christoph Date: Fri, 23 Oct 2026 11:13:42 +0200 Subject: [PATCH] create_summary_websites.sh: if 'httpd' is not in path, try to determin it. --- create_summary_websites.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/create_summary_websites.sh b/create_summary_websites.sh index 88c28e5..e6f639e 100755 --- a/create_summary_websites.sh +++ b/create_summary_websites.sh @@ -484,7 +484,16 @@ echo ";" >> $filename_no_php_assigned # - Check if mod_php is installed. # - mod_php_installed=false -if $(httpd -M | grep -q -E "php[5-9]?_module" 2>/dev/null) ; then +if ! which httpd > /dev/null ; then + if [ -x "/usr/local/apache2/bin/httpd" ] ; then + httpd_command="/usr/local/apache2/bin/httpd" + else + fatal "httpd command not found!" + fi +else + httpd_command="$(which httpd)" +fi +if $(${httpd_command} -M | grep -q -E "php[5-9]?_module" 2>/dev/null) ; then mod_php_installed=true if $(apachectl status | grep -q "PHP/" 2>/dev/null) ; then MOD_PHP_VERSION="$(trim $(apachectl status | grep "PHP/" | cut -d '/' -f2))"