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

59 lines
1.7 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
#make sure unzip is install
apt-get install unzip
#get the ioncube 64 bit loader
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.zip
#uncompress the file
unzip ioncube_loaders_lin_x86-64.zip
#remove the zip file
rm ioncube_loaders_lin_x86-64.zip
2019-02-17 18:49:50 +01:00
#remove the ioncube directory if it exists
2019-02-17 18:51:10 +01:00
if [ -d "$(dirname "$0")/ioncube" ]; then
rm -Rf $(dirname "$0")/ioncube
2019-02-17 18:49:50 +01:00
fi
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
echo "zend_extension = /usr/lib/php5/20131226/ioncube_loader_lin_5.6.so" > /etc/php5/fpm/conf.d/00-ioncube.ini
#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
echo "zend_extension = /usr/lib/php/20151012/ioncube_loader_lin_7.0.so" > /etc/php/7.0/fpm/conf.d/00-ioncube.ini
#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
2018-03-07 04:25:01 +01:00
echo "zend_extension = /usr/lib/php/20160303/ioncube_loader_lin_7.1.so" > /etc/php/7.1/fpm/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