Fix linking pecl ini file on self-hosted environments

This commit is contained in:
Shivam Mathur 2022-03-07 09:14:14 +05:30
parent 341d29a88f
commit 02131e37d9
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -175,7 +175,10 @@ link_pecl_file() {
echo '' | sudo tee "$pecl_file" >/dev/null 2>&1
for file in "${ini_file[@]}"; do
sapi_scan_dir="$(realpath -m "$(dirname "$file")")/conf.d"
[ "$sapi_scan_dir" != "$scan_dir" ] && ! [ -h "$sapi_scan_dir" ] && sudo ln -sf "$pecl_file" "$sapi_scan_dir/99-pecl.ini"
if [ "$sapi_scan_dir" != "$scan_dir" ] && ! [ -h "$sapi_scan_dir" ]; then
sudo mkdir -p "$sapi_scan_dir"
sudo ln -sf "$pecl_file" "$sapi_scan_dir/99-pecl.ini"
fi
done
}