mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 11:51:07 +07:00
Use phpenmod to enable extensions on linux
This commit is contained in:
parent
39b4e4a983
commit
2f306f9d25
@ -48,7 +48,13 @@ enable_extension() {
|
|||||||
[ -d "$modules_dir" ] && sudo find "$modules_dir" -path "*disabled*$1" -delete
|
[ -d "$modules_dir" ] && sudo find "$modules_dir" -path "*disabled*$1" -delete
|
||||||
enable_extension_dependencies "$1" "$2"
|
enable_extension_dependencies "$1" "$2"
|
||||||
enable_cache_extension_dependencies "$1" "$2"
|
enable_cache_extension_dependencies "$1" "$2"
|
||||||
echo "$2=${ext_dir:?}/$1.so" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null
|
if command -v phpenmod >/dev/null 2>&1; then
|
||||||
|
mod="${ini_dir:?}"/../mods-available/"$1".ini
|
||||||
|
[ ! -e "$mod" ] || echo "$2=${ext_dir:?}/$1.so" | sudo tee "$mod" >/dev/null
|
||||||
|
sudo phpenmod -v "$version" "$1" >/dev/null 2>&1
|
||||||
|
else
|
||||||
|
echo "$2=${ext_dir:?}/$1.so" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user