Improve remove_extensions in linux

This commit is contained in:
Shivam Mathur 2020-01-10 06:18:53 +05:30
parent 71db1e2cf1
commit 0bfa897634
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -47,7 +47,8 @@ remove_extension() {
sudo phpdismod -v "$version" "$extension"
fi
sudo sed -i "/$extension/d" "$ini_file"
sudo DEBIAN_FRONTEND=noninteractive apt-get remove php-"$extension" -y >/dev/null 2>&1
sudo rm -rf /etc/php/"$version"/cli/conf.d/*"$extension"* >/dev/null 2>&1
sudo rm -rf "$ext_dir"/"$extension".so >/dev/null 2>&1
}
# Function to setup a remote tool