Use local php. Part 3
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user