Skip to content

Commit

Permalink
Use phpenmod only for PHP 5.6 and above
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Apr 2, 2023
1 parent c61bd0e commit 3d794dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/extensions/add_extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d794dd

Please sign in to comment.