From 282305f4d703b46fe5750d06534389e169f1e095 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sun, 16 Jan 2022 09:37:27 +0530 Subject: [PATCH] Fix to not delete pecl.ini when disabling extensions --- src/scripts/extensions/add_extensions.sh | 2 +- src/scripts/linux.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/extensions/add_extensions.sh b/src/scripts/extensions/add_extensions.sh index 06105cbb..41c9fb75 100644 --- a/src/scripts/extensions/add_extensions.sh +++ b/src/scripts/extensions/add_extensions.sh @@ -94,7 +94,7 @@ disable_extension() { # Function to disable shared extensions. disable_all_shared() { sudo sed -i.orig -E -e "/^(zend_)?extension\s*=/d" "${ini_file[@]}" "$pecl_file" 2>/dev/null || true - sudo find "${ini_dir:-$scan_dir}"/.. -name "*.ini" -not -path "*php.ini" -not -path "*phar.ini" -not -path "*mods-available*" -delete >/dev/null 2>&1 || true + sudo find "${ini_dir:-$scan_dir}"/.. -name "*.ini" -not -path "*php.ini" -not -path "*phar.ini" -not -path "*pecl.ini" -not -path "*mods-available*" -delete >/dev/null 2>&1 || true add_log "${tick:?}" "none" "Disabled all shared extensions" } diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index 2df296ea..cde011b1 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -29,7 +29,7 @@ disable_extension_helper() { disable_extension_dependents "$extension" fi sudo sed -Ei "/=(.*\/)?\"?$extension(.so)?$/d" "${ini_file[@]}" "$pecl_file" - sudo find "$ini_dir"/.. -name "*$extension.ini" -not -path "*phar.ini" -not -path "*mods-available*" -delete >/dev/null 2>&1 || true + sudo find "$ini_dir"/.. -name "*$extension.ini" -not -path "*phar.ini" -not -path "*pecl.ini" -not -path "*mods-available*" -delete >/dev/null 2>&1 || true } # Function to add PDO extension.