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

77 lines
2.2 KiB
Bash
Raw Normal View History

Devuan: update all install scripts from debian (#390) * devuan: pull fail2ban updates from debian installer * devuan: merge updates to postgresql.sh from debian * devuan: pull updated resources/backup scripts from debian * devuan: merge and update php installer scripts * devuan: merged changes to reset_admin_password.sh from debian * devuan: fix release name typo for chimaera * devuan: merge iptables changes from debian * devuan: merge nginx changes from debian * devuan: merge letsencrypt.sh from debian * devuan: merge main install scripts and config from debian * devuan: simplify sngrep install, its in all maintained releases * devuan: merge main install script updates from debian * devuan: finish.sh: use /usr/sbin/service for restart * devuan: postgresql.sh: fix syntax error * devuan: update and unify sysvinit setup there is no sysvinit package available from freeswitch, usethe same init and defaults file for package and source install * devuan: add equvalent debian releasesto environment.sh * devuan: merge changes to switch* from debian * devuan: switch: use os_codenam_debian to add repos * devuan: olny stop ufw if it was installed * devuan: update config.sh defaults * devuan: remove systemd-specifics from switch package installation * devuan: install postgres before freeswitch * devuan: removed libyuv-dev installation, embedded in freeswitch * devuan: fix failing move of freeswitch music * devuan: removed another libyuv-dev installation, embedded in freeswitch * devuan: revert freeswitch script dir setting in /etc/default * devuan: Enable mod_av for the install. (#389) * devuan: merge improved nginx ssl settings (#388)
2022-04-19 03:37:02 +02:00
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ./config.sh
. ./colors.sh
. ./environment.sh
#show cpu details
echo "cpu architecture: $cpu_architecture"
echo "cpu name: $cpu_name"
#make sure unzip is install
apt-get install -y unzip
#remove the ioncube directory if it exists
if [ -d "ioncube" ]; then
rm -Rf ioncube;
fi
#get the ioncube load and unzip it
if [ .$cpu_architecture = .'x86' ]; then
#get the ioncube 64 bit loader
wget --no-check-certificate 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
elif [ .$cpu_architecture = ."arm" ]; then
if [ .$cpu_name = .'armv7l' ]; then
#get the ioncube 64 bit loader
wget --no-check-certificate https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_armv7l.zip
#uncompress the file
unzip ioncube_loaders_lin_armv7l.zip
#remove the zip file
rm ioncube_loaders_lin_armv7l.zip
fi
fi
#set the version of php
if [ ."$os_codename" = ."beowolf" ]; then
php_version=7.3
fi
if [ ."$os_codename" = ."chimaera" ]; then
php_version=7.4
fi
#copy the loader to the correct directory
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
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
#restart the service
/usr/sbin/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
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
/usr/sbin/service php7.4-fpm restart
fi