File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -458,17 +458,32 @@ install:
458
458
#
459
459
460
460
read -r APPLICATION_NAME < "{{.TMP_INSTALL_DIR}}/{{.USER_INPUT}}"
461
+ echo -e "{{.YELLOW}}cli dir path after change is $CLI_INI_DIR{{.GRAY}}"
462
+ echo -e "{{.YELLOW}}web dir path after change is $WEB_INI_DIR{{.GRAY}}"
461
463
INI_DIRS=($WEB_INI_DIR $CLI_INI_DIR)
462
464
for dirs in $INI_DIRS; do
463
465
for ini in $dirs; do
466
+ echo -e "{{.YELLOW}}ini path is $ini{{.GRAY}}"
464
467
#
465
468
# Get the PHP INI Directory associated with this specific NR INI file
466
469
#
467
470
php_ini_dir=$(echo $ini | sed -n 's/\(.*\)\/conf.d/\1/p')
468
471
if [ -z "${php_ini_dir}" ]; then
469
- php_ini_dir=$ini
472
+ if [[ "$dirs" == "$WEB_INI_DIR" ]]; then
473
+ if [[ -d "${ini}/../apache2/conf.d" ]]; then
474
+ php_ini_dir="${ini}/../apache2/conf.d"
475
+ fi
476
+ if [[ -d "${ini}/../fpm/conf.d" ]]; then
477
+ php_ini_dir="${ini}/../fpm/conf.d"
478
+ fi
479
+ elif [[ "$dirs" == "$CLI_INI_DIR" ]]; then
480
+ php_ini_dir="${php_ini_dir}/../cli/conf.d"
481
+ else
482
+ echo -e "something went wrong while checking for paths"
483
+ php_ini_dir=${ini}
484
+ fi
470
485
fi
471
-
486
+ echo -e "{{.YELLOW}}php ini dir path is: $php_ini_dir{{.GRAY}}"
472
487
#
473
488
# Get the PHP Binary directory associated with this particular NR INI file.
474
489
sed_slash_ini=$(echo "${ini}" | sed 's/\//\\\//g')
You can’t perform that action at this time.
0 commit comments