Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- WHO=$(whoami)
- if [ ${WHO} == "root" ]
- then
- echo "Script Initialized ..."
- else
- echo "You must be logged in as root to install ionCube Loader."
- echo "Terminating ..."
- exit 0
- fi
- cd /usr/local/
- if [ -e ioncube_loaders_lin_x86.tar.gz ] || [ -e ioncube_loaders_lin_x86-64.tar.gz ]
- then
- rm -f ioncube_loaders_lin_x86.tar.gz
- rm -f ioncube_loaders_lin_x86-64.tar.gz
- fi
- if [ `getconf LONG_BIT` = "64" ]
- then
- # 64-bit stuff here
- wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
- else
- # 32-bit stuff here
- wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
- fi
- if [ `getconf LONG_BIT` = "64" ]
- then
- # 64-bit stuff here
- tar -zxvf ioncube_loaders_lin_x86-64.tar.gz
- else
- # 32-bit stuff here
- tar -zxvf ioncube_loaders_lin_x86.tar.gz
- fi
- chown -R root.root ioncube
- phpline=`php -v | grep ^PHP | cut -f2 -d " "| awk -F "." '{print "zend_extension=\"/usr/local/ioncube/ioncube_loader_lin_"$1"."$2".so\""}'`
- phpinifile=`php -i | grep php.ini | grep ^Configuration | cut -f6 -d" "`
- echo "Adding line $phpline to file $phpinifile"
- echo "$phpline" >> $phpinifile
- if [ `getconf LONG_BIT` = "64" ]
- then
- # 64-bit stuff here
- rm -f ioncube_loaders_lin_x86-64.tar.gz
- else
- # 32-bit stuff here
- rm -f ioncube_loaders_lin_x86.tar.gz
- fi
- echo "Ioncube installed sucessfully"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement