create_summary_websites.sh: if 'httpd' is not in path, try to determin it.
This commit is contained in:
@@ -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))"
|
||||
|
||||
Reference in New Issue
Block a user