Use local php. Part 3

This commit is contained in:
Alexey Berezhok
2025-01-18 15:55:12 +03:00
parent 2f91eee76d
commit f3b9d33016
10 changed files with 161 additions and 139 deletions

View File

@@ -63,22 +63,23 @@ csv_list() {
#----------------------------------------------------------#
# Defining config path
if [ -f /etc/redhat-release ]; then
config_path=$(find /etc/opt/remi/php* -name php.ini)
if [ "$LOCAL_PHP" == "yes" ]; then
config_path=$(find /opt/brepo/php* -name php.ini)
else
config_path=$(find /etc/php* -name php.ini)
config_path=$(find /etc/opt/remi/php* -name php.ini)
fi
config_count=$(echo "$config_path" | wc -l)
if [ "$config_count" -gt 1 ]; then
if [ -f /etc/redhat-release ]; then
multiphp_versions=$(ls -d /etc/opt/remi/php*/php-fpm.d 2> /dev/null | wc -l)
if [ "$LOCAL_PHP" == "yes" ]; then
multiphp_versions=$(ls -d /opt/brepo/php*/etc/php-fpm.d 2> /dev/null | wc -l)
else
multiphp_versions=$(ls -d /etc/php/*/fpm/pool.d 2> /dev/null | wc -l)
multiphp_versions=$(ls -d /etc/opt/remi/php*/php-fpm.d 2> /dev/null | wc -l)
fi
if [ "$WEB_BACKEND" = 'php-fpm' ] || [ "$multiphp_versions" -gt 0 ]; then
config_path=$(echo "$config_path" | grep fpm)
else
config_path=$(echo "$config_path" | grep apache)
config_path=$(echo "$config_path" | grep httpd)
fi
fi