Fix extension setup on self-hosted linux

This commit is contained in:
Shivam Mathur 2020-11-15 18:52:43 +05:30
parent 385e3b6e96
commit 45213ad923
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -62,11 +62,13 @@ remove_extension() {
if check_extension "$extension"; then
if [[ ! "$version" =~ ${old_versions:?} ]] && [ -e /etc/php/"$version"/mods-available/"$extension".ini ]; then
sudo phpdismod -v "$version" "$extension" >/dev/null 2>&1
echo "$extension" | sudo tee -a /tmp/setup_php_dismod >/dev/null 2>&1
fi
delete_extension "$extension"
(! check_extension "$extension" && add_log "${tick:?}" ":$extension" "Removed") ||
add_log "${cross:?}" ":$extension" "Could not remove $extension on PHP ${semver:?}"
else
delete_extension "$extension"
add_log "${tick:?}" ":$extension" "Could not find $extension on PHP $semver"
fi
}