Skip to content

Commit 93909d1

Browse files
chore(php): point direct php ini dir
1 parent 3fa04a9 commit 93909d1

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

recipes/newrelic/apm/php/debian.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,19 @@ install:
458458
#
459459
460460
read -r APPLICATION_NAME < "{{.TMP_INSTALL_DIR}}/{{.USER_INPUT}}"
461+
462+
if [[ "$CLI_INI_DIR" == */mods-available ]]; then
463+
CLI_INI_DIR = "${CLI_INI_DIR}/../cli/conf.d"
464+
fi
465+
if [[ "$WEB_INI_DIR" == */mods-available ]]; then
466+
if [[ -d "${WEB_INI_DIR}/../apache2/conf.d" ]]; then
467+
WEB_INI_DIR="${WEB_INI_DIR}/../apache2/conf.d"
468+
fi
469+
if [[ -d "${WEB_INI_DIR}/../fpm/conf.d" ]]; then
470+
WEB_INI_DIR="${WEB_INI_DIR}/../fpm/conf.d"
471+
fi
472+
fi
473+
461474
INI_DIRS=($WEB_INI_DIR $CLI_INI_DIR)
462475
for dirs in $INI_DIRS; do
463476
for ini in $dirs; do
@@ -520,7 +533,7 @@ install:
520533
#
521534
target_ini_dir="/etc/php5/conf.d/"
522535
if [ -x /usr/sbin/phpquery ]; then
523-
target_ini_dir="${ini}"
536+
target_ini_dir="${ini}/../../mods-available/"
524537
elif [ -x /usr/sbin/php5endmod ]; then
525538
target_ini_dir="/etc/php5/mods-available/"
526539
fi
@@ -534,9 +547,7 @@ install:
534547
# system.
535548
#
536549
537-
if [ ! -f "${target_ini_dir}/$(basename ${ini_full_name})" ]; then
538-
mv "${ini_full_name}" "${target_ini_dir}"
539-
fi
550+
mv ${ini_full_name} ${target_ini_dir}
540551
541552
#
542553
# We rely on the package installer to enable the newrelic module.

0 commit comments

Comments
 (0)