2020-07-19 11:09:45 +05:30
|
|
|
# Function to log result of a operation.
|
2020-07-23 05:47:11 +05:30
|
|
|
add_license_log() {
|
2022-01-30 10:00:11 +05:30
|
|
|
printf "$GROUP\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "ioncube" "Click to read the ioncube loader license information"
|
2021-09-19 09:32:31 +05:30
|
|
|
cat "${ext_dir:?}"/IONCUBE_LICENSE.txt
|
2022-01-30 10:00:11 +05:30
|
|
|
echo "$END_GROUP"
|
2020-07-19 11:09:45 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
# Function to install ioncube.
|
2020-07-23 05:47:11 +05:30
|
|
|
add_ioncube() {
|
2021-09-19 09:32:31 +05:30
|
|
|
status='Enabled'
|
2021-08-26 15:54:09 +05:30
|
|
|
if ! shared_extension ioncube; then
|
2020-07-19 11:09:45 +05:30
|
|
|
status='Installed and enabled'
|
2024-05-22 06:54:49 +05:30
|
|
|
arch="$(uname -m)"
|
|
|
|
if [ "$(uname -s)" = "Darwin" ]; then
|
|
|
|
[ "$arch" = "arm64" ] && os_suffix="dar_arm64" || os_suffix="mac_x86-64"
|
|
|
|
else
|
|
|
|
[[ "$arch" = "i386" || "$arch" = "i686" ]] && arch=x86
|
|
|
|
[[ "$arch" = "x86_64" ]] && arch=x86-64
|
|
|
|
os_suffix="lin_$arch"
|
|
|
|
fi
|
|
|
|
ts_part="" && [ "${ts:?}" = "zts" ] && ts_part="_ts"
|
|
|
|
get -s -n "" https://downloads.ioncube.com/loader_downloads/ioncube_loaders_"$os_suffix".tar.gz | tar -xzf - -C /tmp
|
|
|
|
loader_file=/tmp/ioncube/ioncube_loader_"${os_suffix%%_*}_${version:?}$ts_part".so
|
|
|
|
if [ -e "$loader_file" ]; then
|
|
|
|
sudo mv /tmp/ioncube/ioncube_loader_"${os_suffix%%_*}_${version:?}$ts_part".so "${ext_dir:?}/ioncube.so"
|
|
|
|
sudo cp /tmp/ioncube/LICENSE.txt "$ext_dir"/IONCUBE_LICENSE.txt
|
|
|
|
echo "zend_extension=$ext_dir/ioncube.so" | sudo tee "${scan_dir:?}/00-ioncube.ini" >/dev/null 2>&1
|
|
|
|
fi
|
2020-07-19 11:09:45 +05:30
|
|
|
fi
|
2020-07-23 05:47:11 +05:30
|
|
|
add_extension_log "ioncube" "$status"
|
|
|
|
check_extension "ioncube" && add_license_log
|
2020-07-26 15:48:19 +05:30
|
|
|
}
|