Browse Source

Add ionCube for php7.2

lj2007331@gmail.com 7 years ago
parent
commit
598e16d417
4 changed files with 9 additions and 2 deletions
  1. 1 1
      addons.sh
  2. 4 0
      include/ioncube.sh
  3. 3 0
      include/upgrade_oneinstack.sh
  4. 1 1
      install.sh

+ 1 - 1
addons.sh

@@ -341,7 +341,7 @@ What Are You Doing?
               echo; echo "${CWARNING}Your php ${PHP_detail_version} or platform ${TARGET_ARCH} does not support ${PHP_extension}! ${CEND}";
             fi
           elif [ "${Loader}" = '2' ]; then
-            if [[ "${PHP_main_version}" =~ ^5.[3-6]$|^7.[0-1]$ ]] || [ "${TARGET_ARCH}" != "arm64" ]; then
+            if [[ "${PHP_main_version}" =~ ^5.[3-6]$|^7.[0-2]$ ]] || [ "${TARGET_ARCH}" != "arm64" ]; then
               ionCube_yn='y' && checkDownload
               Install_ionCube
               Restart_PHP; echo "${CSUCCESS}PHP ioncube module installed successfully! ${CEND}";

+ 4 - 0
include/ioncube.sh

@@ -25,6 +25,10 @@ Install_ionCube() {
 
   [ ! -d "${phpExtensionDir}" ] && mkdir -p ${phpExtensionDir}
   case "${PHP_main_version}" in
+    7.2)
+      /bin/cp ioncube/ioncube_loader_lin_7.2.so ${phpExtensionDir}
+      zend_extension="${phpExtensionDir}/ioncube_loader_lin_7.2.so"
+      ;;
     7.1)
       /bin/cp ioncube/ioncube_loader_lin_7.1.so ${phpExtensionDir}
       zend_extension="${phpExtensionDir}/ioncube_loader_lin_7.1.so"

+ 3 - 0
include/upgrade_oneinstack.sh

@@ -11,8 +11,10 @@
 Upgrade_OneinStack() {
   pushd ${oneinstack_dir} > /dev/null
   Latest_OneinStack_MD5=$(curl -s http://mirrors.linuxeye.com/md5sum.txt | grep oneinstack.tar.gz | awk '{print $1}')
+  [ ! -e install.sh ] && install_flag=n 
   if [ "$oneinstack_md5" != "$Latest_OneinStack_MD5" ]; then
     /bin/mv options.conf /tmp
+    /bin/mv backup*.sh /tmp
     [ -e /tmp/oneinstack.tar.gz ] && rm -rf /tmp/oneinstack.tar.gz
     wget -c http://mirrors.linuxeye.com/oneinstack.tar.gz -O /tmp/oneinstack.tar.gz > /dev/null 2>&1 
     tar xzf /tmp/oneinstack.tar.gz -C ../
@@ -23,6 +25,7 @@ Upgrade_OneinStack() {
       sed -i "s@^${Key}=.*@${Key}=${Value}@" ./options.conf
     done
     rm -rf /tmp/{oneinstack.tar.gz,options.conf}
+    [ "$install_flag" == 'n' ] && { /bin/mv /tmp/backup*.sh .; rm -rf install.sh LICENSE README.md; }
     sed -i "s@^oneinstack_md5=.*@oneinstack_md5=${Latest_OneinStack_MD5}@" ./options.conf
     echo
     echo "${CSUCCESS}Congratulations! OneinStack successful! ${CEND}"

+ 1 - 1
install.sh

@@ -368,7 +368,7 @@ while :; do echo
           fi
 
           # ionCube
-          if [ "${TARGET_ARCH}" != "arm64" ] && [[ $PHP_version =~ ^[1-6]$ ]]; then
+          if [ "${TARGET_ARCH}" != "arm64" ]; then
             while :; do echo
               read -p "Do you want to install ionCube? [y/n]: " ionCube_yn
               if [[ ! $ionCube_yn =~ ^[y,n]$ ]]; then