fusionpbx-install.sh/debian/resources/ioncube.sh

152 lines
5.3 KiB
Bash
Raw Normal View History

2018-02-28 09:20:33 +01:00
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ./config.sh
. ./colors.sh
. ./environment.sh
2021-06-25 19:24:07 +02:00
#show cpu details
echo "cpu architecture: $cpu_architecture"
echo "cpu name: $cpu_name"
2018-02-28 09:20:33 +01:00
#make sure unzip is install
2019-02-17 19:04:43 +01:00
apt-get install -y unzip
#remove the ioncube directory if it exists
if [ -d "ioncube" ]; then
rm -Rf ioncube;
fi
2018-02-28 09:20:33 +01:00
2019-02-17 19:29:52 +01:00
#get the ioncube load and unzip it
2019-02-17 19:06:45 +01:00
if [ .$cpu_architecture = .'x86' ]; then
#get the ioncube 64 bit loader
2020-06-02 19:35:10 +02:00
wget --no-check-certificate https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.zip
2019-02-17 19:06:45 +01:00
#uncompress the file
unzip ioncube_loaders_lin_x86-64.zip
2018-02-28 09:20:33 +01:00
2019-02-17 19:06:45 +01:00
#remove the zip file
rm ioncube_loaders_lin_x86-64.zip
2021-06-25 19:24:07 +02:00
elif [ .$cpu_architecture = ."arm" ]; then
2019-02-17 19:29:52 +01:00
if [ .$cpu_name = .'armv7l' ]; then
#get the ioncube 64 bit loader
2020-06-02 19:35:10 +02:00
wget --no-check-certificate https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_armv7l.zip
2019-02-17 19:29:52 +01:00
#uncompress the file
unzip ioncube_loaders_lin_armv7l.zip
#remove the zip file
rm ioncube_loaders_lin_armv7l.zip
fi
2019-02-17 19:06:45 +01:00
fi
2018-02-28 09:20:33 +01:00
2019-08-21 01:42:14 +02:00
#set the version of php
2023-04-27 16:36:45 +02:00
#if [ ."$os_codename" = ."bullseye" ]; then
# php_version=8.0
#fi
#if [ ."$os_codename" = ."buster" ]; then
# php_version=7.4
#fi
#if [ ."$os_codename" = ."stretch" ]; then
# php_version=7.1
#fi
#if [ ."$os_codename" = ."jessie" ]; then
# php_version=7.1
#fi
2019-08-21 01:42:14 +02:00
2018-02-28 09:20:33 +01:00
#copy the loader to the correct directory
2018-10-10 04:38:04 +02:00
if [ ."$php_version" = ."5.6" ]; then
2018-02-28 09:20:33 +01:00
#copy the php extension .so into the php lib directory
2018-02-28 09:37:14 +01:00
cp ioncube/ioncube_loader_lin_5.6.so /usr/lib/php5/20131226
#add the 00-ioncube.ini file
2023-04-27 16:30:01 +02:00
echo "zend_extension = /usr/lib/php5/20131226/ioncube_loader_lin_5.6.so" > /etc/php5/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php5/20131226/ioncube_loader_lin_5.6.so" > /etc/php5/cli/conf.d/00-ioncube.ini
2018-02-28 09:37:14 +01:00
#restart the service
service php5-fpm restart
2018-02-28 09:20:33 +01:00
fi
2019-01-20 17:55:56 +01:00
if [ ."$php_version" = ."7.0" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_7.0.so /usr/lib/php/20151012
#add the 00-ioncube.ini file
2023-04-27 16:30:01 +02:00
echo "zend_extension = /usr/lib/php/20151012/ioncube_loader_lin_7.0.so" > /etc/php/7.0/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20151012/ioncube_loader_lin_7.0.so" > /etc/php/7.0/cli/conf.d/00-ioncube.ini
2019-01-20 17:55:56 +01:00
#restart the service
service php7.0-fpm restart
fi
2018-10-10 04:38:04 +02:00
if [ ."$php_version" = ."7.1" ]; then
2018-02-28 09:20:33 +01:00
#copy the php extension .so into the php lib directory
2018-03-07 04:25:01 +01:00
cp ioncube/ioncube_loader_lin_7.1.so /usr/lib/php/20160303
2018-02-28 09:20:33 +01:00
#add the 00-ioncube.ini file
2023-04-27 16:30:01 +02:00
echo "zend_extension = /usr/lib/php/20160303/ioncube_loader_lin_7.1.so" > /etc/php/7.1/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20160303/ioncube_loader_lin_7.1.so" > /etc/php/7.1/cli/conf.d/00-ioncube.ini
2018-02-28 09:20:33 +01:00
2018-02-28 09:37:14 +01:00
#restart the service
2018-03-07 04:25:01 +01:00
service php7.1-fpm restart
2018-02-28 09:20:33 +01:00
fi
2020-04-30 04:18:54 +02:00
if [ ."$php_version" = ."7.2" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_7.2.so /usr/lib/php/20170718
#add the 00-ioncube.ini file
2023-04-27 16:30:01 +02:00
echo "zend_extension = /usr/lib/php/20170718/ioncube_loader_lin_7.2.so" > /etc/php/7.2/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20170718/ioncube_loader_lin_7.2.so" > /etc/php/7.2/cli/conf.d/00-ioncube.ini
2020-04-30 04:18:54 +02:00
#restart the service
service php7.2-fpm restart
fi
2019-08-21 01:09:52 +02:00
if [ ."$php_version" = ."7.3" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_7.3.so /usr/lib/php/20180731
#add the 00-ioncube.ini file
2023-04-27 16:30:01 +02:00
echo "zend_extension = /usr/lib/php/20180731/ioncube_loader_lin_7.3.so" > /etc/php/7.3/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20180731/ioncube_loader_lin_7.3.so" > /etc/php/7.3/cli/conf.d/00-ioncube.ini
2019-08-21 01:09:52 +02:00
#restart the service
service php7.3-fpm restart
fi
if [ ."$php_version" = ."7.4" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_7.4.so /usr/lib/php/20190902
#add the 00-ioncube.ini file
2023-04-27 16:30:01 +02:00
echo "zend_extension = /usr/lib/php/20190902/ioncube_loader_lin_7.4.so" > /etc/php/7.4/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20190902/ioncube_loader_lin_7.4.so" > /etc/php/7.4/cli/conf.d/00-ioncube.ini
#restart the service
service php7.4-fpm restart
fi
2023-04-27 16:30:01 +02:00
if [ ."$php_version" = ."8.1" ]; then
#copy the php extension .so into the php lib directory
2023-05-12 06:57:40 +02:00
cp ioncube/ioncube_loader_lin_8.1.so /usr/lib/php/20210902
2023-04-27 16:30:01 +02:00
#add the 00-ioncube.ini file
2023-05-12 06:57:40 +02:00
echo "zend_extension = /usr/lib/php/20210902/ioncube_loader_lin_8.1.so" > /etc/php/8.1/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20210902/ioncube_loader_lin_8.1.so" > /etc/php/8.1/cli/conf.d/00-ioncube.ini
2023-04-27 16:30:01 +02:00
#restart the service
service php8.1-fpm restart
fi
2025-03-11 02:58:56 +01:00
if [ ."$php_version" = ."8.2" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_8.2.so /usr/lib/php/20210902
#add the 00-ioncube.ini file
2025-03-11 03:01:48 +01:00
echo "zend_extension = /usr/lib/php/20220829/ioncube_loader_lin_8.2.so" > /etc/php/8.2/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20220829/ioncube_loader_lin_8.2.so" > /etc/php/8.2/cli/conf.d/00-ioncube.ini
2025-03-11 02:58:56 +01:00
#restart the service
service php8.2-fpm restart
fi
2023-04-27 16:30:01 +02:00