22 lines
941 B
Bash
Raw Normal View History

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() {
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
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'
if ! shared_extension ioncube; then
2020-07-19 11:09:45 +05:30
status='Installed and enabled'
2020-07-23 05:47:11 +05:30
os_name='lin' && [ "$(uname -s)" = "Darwin" ] && os_name='mac'
2020-11-11 02:23:45 +05:30
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"
2021-09-19 09:32:31 +05:30
sudo cp /tmp/ioncube/LICENSE.txt "$ext_dir"/IONCUBE_LICENSE.txt
2020-07-19 11:09:45 +05:30
fi
2020-07-23 05:47:11 +05:30
echo "zend_extension=$ext_dir/ioncube.so" | sudo tee "${scan_dir:?}/00-ioncube.ini" >/dev/null 2>&1
add_extension_log "ioncube" "$status"
check_extension "ioncube" && add_license_log
2020-07-26 15:48:19 +05:30
}