mod_php_install.sh: some minor changes.

This commit is contained in:
Christoph 2022-02-04 02:10:06 +01:00
parent 7ec0bbcae8
commit b2bfd94a3d

View File

@ -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
## --------------------------------------------------