diff --git a/mod_php_install.sh b/mod_php_install.sh index 4e3f3d4..5a2cf68 100755 --- a/mod_php_install.sh +++ b/mod_php_install.sh @@ -31,7 +31,7 @@ _MAX_INPUT_TIME=180 _UPLOAD_MAX_FILESIZE="128M" _POST_MAX_SIZE="128M" -_SKIP_UPDATE_DB=no +_SKIP_UPDATE_DB=yes _CRONTAB_BAKUP_FILE="$(mktemp)" @@ -294,7 +294,12 @@ if [ -x "$_httpd_binary" ];then web_user="`$_httpd_binary -t -D DUMP_RUN_CFG | grep -i -e "^User" | awk '{print$2}' | cut -d\"=\" -f2 | tr -d '"'`" web_group="`$_httpd_binary -t -D DUMP_RUN_CFG | grep -i -e "^Group" | awk '{print$2}' | cut -d\"=\" -f2 | tr -d '"'`" if [ -z "$web_user" -o -z "$web_group" ]; then - _HTTPD_USER=www-data + if [[ -f "/usr/local/apache2/conf/httpd.conf" ]] ; then + _HTTPD_USER="$(grep -E "^\s*User\s" "/usr/local/apache2/conf/httpd.conf" | awk '{print$2}')" + _HTTPD_GROUP="$(grep -E "^\s*Group\s" "/usr/local/apache2/conf/httpd.conf" | awk '{print$2}')" + fi + [[ -z "$_HTTPD_USER" ]] && _HTTPD_USER=www-data + else _HTTPD_USER=$web_user _HTTPD_GROUP=$web_group @@ -302,6 +307,7 @@ if [ -x "$_httpd_binary" ];then fi + ## --------------------------------------------------