Use phpenmod only for PHP 5.6 and above

This commit is contained in:
Shivam Mathur 2023-04-03 01:18:19 +05:30
parent c61bd0e074
commit 3d794ddd93
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -48,7 +48,7 @@ enable_extension() {
[ -d "$modules_dir" ] && sudo find "$modules_dir" -path "*disabled*$1" -delete
enable_extension_dependencies "$1" "$2"
enable_cache_extension_dependencies "$1" "$2"
if command -v phpenmod >/dev/null 2>&1; then
if ! [[ "${version:?}" =~ ${old_versions:?} ]] && command -v phpenmod >/dev/null 2>&1; then
mod="${ini_dir:?}"/../mods-available/"$1".ini
[ -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