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))"