Fix Ioncube logs if cached

This commit is contained in:
Shivam Mathur 2021-09-19 09:32:31 +05:30
parent bc0d607611
commit 2e289f30e2
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
2 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,7 @@ Function Add-LicenseLog() {
# Function to add ioncube extension.
Function Add-Ioncube() {
try {
$status = 'Enabled'
if (-not(Test-Path $ext_dir\php_ioncube.dll)) {
$status = 'Installed and enabled'
$arch_part = $arch

View File

@ -1,17 +1,19 @@
# Function to log result of a operation.
add_license_log() {
printf "::group::\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "ioncube" "Click to read the ioncube loader license information"
cat /tmp/ioncube/LICENSE.txt
cat "${ext_dir:?}"/IONCUBE_LICENSE.txt
echo "::endgroup::"
}
# Function to install ioncube.
add_ioncube() {
status='Enabled'
if ! shared_extension ioncube; then
status='Installed and enabled'
os_name='lin' && [ "$(uname -s)" = "Darwin" ] && os_name='mac'
get -s -n "" https://downloads.ioncube.com/loader_downloads/ioncube_loaders_"$os_name"_x86-64.tar.gz | tar -xzf - -C /tmp
sudo mv /tmp/ioncube/ioncube_loader_"$os_name"_"${version:?}".so "${ext_dir:?}/ioncube.so"
sudo cp /tmp/ioncube/LICENSE.txt "$ext_dir"/IONCUBE_LICENSE.txt
fi
echo "zend_extension=$ext_dir/ioncube.so" | sudo tee "${scan_dir:?}/00-ioncube.ini" >/dev/null 2>&1
add_extension_log "ioncube" "$status"