Fix enable_extension

This commit is contained in:
Shivam Mathur 2023-02-09 15:50:52 +05:30
parent 0d60024683
commit fb1ad7fc84
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -50,7 +50,7 @@ enable_extension() {
enable_cache_extension_dependencies "$1" "$2" enable_cache_extension_dependencies "$1" "$2"
if command -v phpenmod >/dev/null 2>&1; then if command -v phpenmod >/dev/null 2>&1; then
mod="${ini_dir:?}"/../mods-available/"$1".ini mod="${ini_dir:?}"/../mods-available/"$1".ini
[ ! -e "$mod" ] || (echo "; priority=${3:'20'}"; echo "$2=${ext_dir:?}/$1.so") | sudo tee "$mod" >/dev/null [ -e "$mod" ] || (echo "; priority=${3:'20'}"; echo "$2=${ext_dir:?}/$1.so") | sudo tee "$mod" >/dev/null
sudo phpenmod -v "$version" "$1" >/dev/null 2>&1 sudo phpenmod -v "$version" "$1" >/dev/null 2>&1
else else
echo "$2=${ext_dir:?}/$1.so" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null echo "$2=${ext_dir:?}/$1.so" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null