diff --git a/.github/workflows/python-app-mysql55.yml b/.github/workflows/python-app-mysql55.yml new file mode 100644 index 000000000..7b9635fed --- /dev/null +++ b/.github/workflows/python-app-mysql55.yml @@ -0,0 +1,38 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: MW APP MySQL55 + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + strategy: + matrix: + os: [ubuntu-20.04, ubuntu-18.04, ubuntu-22.04] + runs-on: ${{ matrix.os }} + #runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install MW + run: | + sudo bash scripts/install_dev.sh + - name: Install MySQL55 + run: | + cd /www/server/mdserver-web/plugins/mysql && sudo bash install.sh install 5.5 + - name: Start DEBUG + run: | + gunicorn -c setting.py app:app + python3 task.py & diff --git a/.github/workflows/python-app-mysql56.yml b/.github/workflows/python-app-mysql56.yml new file mode 100644 index 000000000..4a3503415 --- /dev/null +++ b/.github/workflows/python-app-mysql56.yml @@ -0,0 +1,38 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: MW APP MySQL56 + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + #runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install MW + run: | + sudo bash scripts/install_dev.sh + - name: Install MySQL56 + run: | + cd /www/server/mdserver-web/plugins/mysql && sudo bash install.sh install 5.6 + - name: Start DEBUG + run: | + gunicorn -c setting.py app:app + python3 task.py & diff --git a/.github/workflows/python-app-mysql57.yml b/.github/workflows/python-app-mysql57.yml new file mode 100644 index 000000000..b52612299 --- /dev/null +++ b/.github/workflows/python-app-mysql57.yml @@ -0,0 +1,38 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: MW APP MySQL57 + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + #runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install MW + run: | + sudo bash scripts/install_dev.sh + - name: Install MySQL57 + run: | + cd /www/server/mdserver-web/plugins/mysql && sudo bash install.sh install 5.7 + - name: Start DEBUG + run: | + gunicorn -c setting.py app:app + python3 task.py & diff --git a/.github/workflows/python-app-mysql8.yml b/.github/workflows/python-app-mysql80.yml similarity index 100% rename from .github/workflows/python-app-mysql8.yml rename to .github/workflows/python-app-mysql80.yml diff --git a/class/core/mw.py b/class/core/mw.py index beb8347f8..57bf3a9c4 100755 --- a/class/core/mw.py +++ b/class/core/mw.py @@ -88,6 +88,11 @@ def setBackupDir(bdir): return writeFile(file, bdir) +def triggerTask(): + isTask = getRunDir() + '/tmp/panelTask.pl' + writeFile(isTask, 'True') + + def getOs(): return sys.platform diff --git a/class/core/plugins_api.py b/class/core/plugins_api.py index ba3ff7c85..eb99e2124 100755 --- a/class/core/plugins_api.py +++ b/class/core/plugins_api.py @@ -125,8 +125,7 @@ class plugins_api: mw.M('tasks').add('id,name,type,status,addtime, execstr', taskAdd) # 任务执行相关 - isTask = mw.getRootDir() + '/tmp/panelTask.pl' - mw.writeFile(isTask, 'True') + mw.triggerTask() return mw.returnJson(True, '已将安装任务添加到队列!') def uninstallOldApi(self): diff --git a/plugins/mysql/install.sh b/plugins/mysql/install.sh index 2f25111c9..aa36df47e 100755 --- a/plugins/mysql/install.sh +++ b/plugins/mysql/install.sh @@ -36,7 +36,7 @@ fi sh -x $curPath/versions/$2/install.sh $1 -if [ "${action}" == "install" ];then +if [ "${action}" == "install" ] && [ -d $serverPath/mysql ];then #初始化 cd ${rootPath} && python3 ${rootPath}/plugins/mysql/index.py start ${type} cd ${rootPath} && python3 ${rootPath}/plugins/mysql/index.py initd_install ${type} diff --git a/plugins/mysql/versions/5.5/install.sh b/plugins/mysql/versions/5.5/install.sh index 659912f7c..b7d0a257d 100755 --- a/plugins/mysql/versions/5.5/install.sh +++ b/plugins/mysql/versions/5.5/install.sh @@ -57,13 +57,14 @@ Install_mysql() -DDEFAULT_CHARSET=utf8mb4 \ -DDEFAULT_COLLATION=utf8mb4_general_ci \ -DCMAKE_C_COMPILER=/usr/bin/gcc \ - -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ - && make ${MAKEJN:--j2} && make install && make clean + -DCMAKE_CXX_COMPILER=/usr/bin/g++ + make clean && make && make install && make clean if [ -d $serverPath/mysql ];then echo '5.5' > $serverPath/mysql/version.pl echo '安装完成' > $install_tmp else + rm -rf ${mysqlDir}/mysql-5.5.62 echo '安装失败' > $install_tmp fi fi diff --git a/plugins/mysql/versions/5.6/install.sh b/plugins/mysql/versions/5.6/install.sh index 31f193176..4937df5aa 100755 --- a/plugins/mysql/versions/5.6/install.sh +++ b/plugins/mysql/versions/5.6/install.sh @@ -61,14 +61,15 @@ Install_mysql() -DDEFAULT_CHARSET=utf8mb4 \ -DCMAKE_C_COMPILER=/usr/bin/gcc \ -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ - -DDEFAULT_COLLATION=utf8mb4_general_ci \ - && make ${MAKEJN:--j2} && make install && make clean + -DDEFAULT_COLLATION=utf8mb4_general_ci + make clean && make && make install && make clean if [ -d $serverPath/mysql ];then echo '5.6' > $serverPath/mysql/version.pl echo '安装完成' > $install_tmp else + rm -rf ${mysqlDir}/mysql-5.6.50 echo '安装失败' > $install_tmp fi fi diff --git a/plugins/mysql/versions/5.7/install.sh b/plugins/mysql/versions/5.7/install.sh index 76376cb9a..b95f7a311 100755 --- a/plugins/mysql/versions/5.7/install.sh +++ b/plugins/mysql/versions/5.7/install.sh @@ -78,9 +78,15 @@ Install_mysql() -DCMAKE_C_COMPILER=/usr/bin/gcc \ -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ -DWITH_BOOST=${mysqlDir}/mysql-${VERSION}/boost/ - make ${MAKEJN:--j2} && make install && make clean - echo '5.7' > $serverPath/mysql/version.pl - echo '安装完成' > $install_tmp + make clean && make && make install && make clean + + if [ -d $serverPath/mysql ];then + echo '5.7' > $serverPath/mysql/version.pl + echo '安装完成' > $install_tmp + else + rm -rf ${mysqlDir}/mysql-${VERSION} + echo '安装失败' > $install_tmp + fi fi } diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index 6a29558c0..9603b6d4b 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -79,12 +79,15 @@ Install_mysql() -DCMAKE_C_COMPILER=/usr/bin/gcc \ -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ -DWITH_BOOST=${mysqlDir}/mysql-8.0.25/boost/ - make ${MAKEJN:--j2} && make install && make clean + make clean && make && make install && make clean if [ -d $serverPath/mysql ];then echo '8.0' > $serverPath/mysql/version.pl + echo '安装完成' > $install_tmp + else + rm -rf ${mysqlDir}/mysql-8.0.25 + echo '安装失败' > $install_tmp fi - echo '安装完成' > $install_tmp fi } diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index 5b597593d..ffa8670c4 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -49,6 +49,8 @@ Install_openresty() if [ -d $serverPath/openresty ];then echo "${VERSION}" > $serverPath/openresty/version.pl + + mkdir -p $serverPath/web_conf/php/conf echo "" > $serverPath/web_conf/php/conf/enable-php-00.conf #初始化 diff --git a/plugins/php/all_test.sh b/plugins/php/all_test.sh index e010a8b30..3a38e8553 100644 --- a/plugins/php/all_test.sh +++ b/plugins/php/all_test.sh @@ -3,6 +3,8 @@ export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/opt/local/share/man:/usr/local DIR=$(cd "$(dirname "$0")"; pwd) +# cd /www/server/mdserver-web/plugins/php && bash all_test.sh + PHP_VER=53 echo "php${PHP_VER} -- start" cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}') @@ -19,123 +21,23 @@ echo "php${PHP_VER} -- end" -PHP_VER=54 -echo "php${PHP_VER} -- start" -cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}') -cd $DIR && /bin/bash install.sh install $PHP_VER -for ii in $cmd_ext -do - if [ "install.sh" == "$ii" ];then - echo '' > /tmp/t.log - else - cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER - fi -done -echo "php${PHP_VER} -- end" - - -PHP_VER=55 -echo "php${PHP_VER} -- start" -cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}') -cd $DIR && /bin/bash install.sh install $PHP_VER -for ii in $cmd_ext -do - if [ "install.sh" == "$ii" ];then - echo '' > /tmp/t.log - else - cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER - fi -done -echo "php${PHP_VER} -- end" - - -PHP_VER=56 -echo "php${PHP_VER} -- start" -cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}') -cd $DIR && /bin/bash install.sh install $PHP_VER -for ii in $cmd_ext -do - if [ "install.sh" == "$ii" ];then - echo '' > /tmp/t.log - else - cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER - fi -done -echo "php${PHP_VER} -- end" - - - -PHP_VER=70 -echo "php${PHP_VER} -- start" -cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}') -cd $DIR && /bin/bash install.sh install $PHP_VER -for ii in $cmd_ext -do - if [ "install.sh" == "$ii" ];then - echo '' > /tmp/t.log - else - cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER - fi -done -echo "php${PHP_VER} -- end" - - -PHP_VER=71 -echo "php${PHP_VER} -- start" -cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}') -cd $DIR && /bin/bash install.sh install $PHP_VER -for ii in $cmd_ext -do - if [ "install.sh" == "$ii" ];then - echo '' > /tmp/t.log - else - cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER - fi -done -echo "php${PHP_VER} -- end" - - -PHP_VER=72 -echo "php${PHP_VER} -- start" -cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}') -cd $DIR && /bin/bash install.sh install $PHP_VER -for ii in $cmd_ext -do - if [ "install.sh" == "$ii" ];then - echo '' > /tmp/t.log - else - cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER - fi -done -echo "php${PHP_VER} -- end" - -PHP_VER=73 -echo "php${PHP_VER} -- start" -cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}') -cd $DIR && /bin/bash install.sh install $PHP_VER -for ii in $cmd_ext -do - if [ "install.sh" == "$ii" ];then - echo '' > /tmp/t.log - else - cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER +PHP_VER_LIST=(54 55 56 71 72 73 74 80 81) +# PHP_VER_LIST=(81) +for PHP_VER in ${PHP_VER_LIST[@]}; do + echo "php${PHP_VER} -- start" + if [ -d /www/server/php/${PHP_VER} ];then + cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}') + for ii in cmd_ext + do + if [ "install.sh" == "$ii" ];then + echo '' > /tmp/t.log + else + cd $DIR/versions/$PHP_VER && bash $ii install ${PHP_VER} + fi + done fi + echo "php${PHP_VER} -- end" done -echo "php${PHP_VER} -- end" -PHP_VER=74 -echo "php${PHP_VER} -- start" -cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}') -cd $DIR && /bin/bash install.sh install $PHP_VER -for ii in $cmd_ext -do - if [ "install.sh" == "$ii" ];then - echo '' > /tmp/t.log - else - cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER - fi -done -echo "php${PHP_VER} -- end" - rm -rf /tmp/t.log diff --git a/plugins/php/index.py b/plugins/php/index.py index 10ab15330..6db5faba6 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -678,6 +678,8 @@ def installLib(version): insert_info = (None, '安装[' + name + '-' + version + ']', 'execshell', '0', rettime, execstr) mw.M('tasks').add('id,name,type,status,addtime,execstr', insert_info) + + mw.triggerTask() return mw.returnJson(True, '已将下载任务添加到队列!') diff --git a/plugins/php/install.sh b/plugins/php/install.sh index b3a6f2f95..9393f0e31 100755 --- a/plugins/php/install.sh +++ b/plugins/php/install.sh @@ -43,7 +43,7 @@ fi cd ${curPath} && sh -x $curPath/versions/$2/install.sh $1 -if [ "${action}" == "install" ];then +if [ "${action}" == "install" ] && [ -d ${serverPath}/php/${type} ];then #初始化 cd ${rootPath} && python3 ${rootPath}/plugins/php/index.py start ${type} cd ${rootPath} && python3 ${rootPath}/plugins/php/index.py initd_install ${type} diff --git a/plugins/php/versions/52/ioncube.sh b/plugins/php/versions/52/ioncube.sh new file mode 100755 index 000000000..bcd8729ef --- /dev/null +++ b/plugins/php/versions/52/ioncube.sh @@ -0,0 +1,96 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` + +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=ioncube +LIBV=0 +sysName=`uname` +actionType=$1 +version=$2 +IC_VERSION=${version:0:1}.${version:1:2} + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} +extFile=${extDir}/${LIBNAME}.so + +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php-$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_lib + mkdir -p $php_lib + if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then + wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz + cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz + fi + cd $php_lib/ioncube + + cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile + fi + + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install ${LIBNAME}, Plese select other version!" + return + fi + + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/53/ioncube.sh b/plugins/php/versions/53/ioncube.sh new file mode 100755 index 000000000..bcd8729ef --- /dev/null +++ b/plugins/php/versions/53/ioncube.sh @@ -0,0 +1,96 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` + +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=ioncube +LIBV=0 +sysName=`uname` +actionType=$1 +version=$2 +IC_VERSION=${version:0:1}.${version:1:2} + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} +extFile=${extDir}/${LIBNAME}.so + +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php-$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_lib + mkdir -p $php_lib + if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then + wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz + cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz + fi + cd $php_lib/ioncube + + cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile + fi + + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install ${LIBNAME}, Plese select other version!" + return + fi + + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/54/ioncube.sh b/plugins/php/versions/54/ioncube.sh new file mode 100755 index 000000000..bcd8729ef --- /dev/null +++ b/plugins/php/versions/54/ioncube.sh @@ -0,0 +1,96 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` + +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=ioncube +LIBV=0 +sysName=`uname` +actionType=$1 +version=$2 +IC_VERSION=${version:0:1}.${version:1:2} + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} +extFile=${extDir}/${LIBNAME}.so + +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php-$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_lib + mkdir -p $php_lib + if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then + wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz + cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz + fi + cd $php_lib/ioncube + + cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile + fi + + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install ${LIBNAME}, Plese select other version!" + return + fi + + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/55/ioncube.sh b/plugins/php/versions/55/ioncube.sh new file mode 100755 index 000000000..bcd8729ef --- /dev/null +++ b/plugins/php/versions/55/ioncube.sh @@ -0,0 +1,96 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` + +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=ioncube +LIBV=0 +sysName=`uname` +actionType=$1 +version=$2 +IC_VERSION=${version:0:1}.${version:1:2} + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} +extFile=${extDir}/${LIBNAME}.so + +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php-$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_lib + mkdir -p $php_lib + if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then + wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz + cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz + fi + cd $php_lib/ioncube + + cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile + fi + + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install ${LIBNAME}, Plese select other version!" + return + fi + + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/56/ioncube.sh b/plugins/php/versions/56/ioncube.sh new file mode 100755 index 000000000..bcd8729ef --- /dev/null +++ b/plugins/php/versions/56/ioncube.sh @@ -0,0 +1,96 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` + +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=ioncube +LIBV=0 +sysName=`uname` +actionType=$1 +version=$2 +IC_VERSION=${version:0:1}.${version:1:2} + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} +extFile=${extDir}/${LIBNAME}.so + +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php-$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_lib + mkdir -p $php_lib + if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then + wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz + cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz + fi + cd $php_lib/ioncube + + cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile + fi + + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install ${LIBNAME}, Plese select other version!" + return + fi + + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/70/ioncube.sh b/plugins/php/versions/70/ioncube.sh new file mode 100755 index 000000000..bcd8729ef --- /dev/null +++ b/plugins/php/versions/70/ioncube.sh @@ -0,0 +1,96 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` + +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=ioncube +LIBV=0 +sysName=`uname` +actionType=$1 +version=$2 +IC_VERSION=${version:0:1}.${version:1:2} + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} +extFile=${extDir}/${LIBNAME}.so + +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php-$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_lib + mkdir -p $php_lib + if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then + wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz + cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz + fi + cd $php_lib/ioncube + + cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile + fi + + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install ${LIBNAME}, Plese select other version!" + return + fi + + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/71/ioncube.sh b/plugins/php/versions/71/ioncube.sh new file mode 100755 index 000000000..bcd8729ef --- /dev/null +++ b/plugins/php/versions/71/ioncube.sh @@ -0,0 +1,96 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` + +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=ioncube +LIBV=0 +sysName=`uname` +actionType=$1 +version=$2 +IC_VERSION=${version:0:1}.${version:1:2} + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} +extFile=${extDir}/${LIBNAME}.so + +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php-$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_lib + mkdir -p $php_lib + if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then + wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz + cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz + fi + cd $php_lib/ioncube + + cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile + fi + + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install ${LIBNAME}, Plese select other version!" + return + fi + + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/72/ioncube.sh b/plugins/php/versions/72/ioncube.sh new file mode 100755 index 000000000..bcd8729ef --- /dev/null +++ b/plugins/php/versions/72/ioncube.sh @@ -0,0 +1,96 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` + +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=ioncube +LIBV=0 +sysName=`uname` +actionType=$1 +version=$2 +IC_VERSION=${version:0:1}.${version:1:2} + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} +extFile=${extDir}/${LIBNAME}.so + +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php-$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_lib + mkdir -p $php_lib + if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then + wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz + cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz + fi + cd $php_lib/ioncube + + cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile + fi + + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install ${LIBNAME}, Plese select other version!" + return + fi + + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/73/ioncube.sh b/plugins/php/versions/73/ioncube.sh new file mode 100755 index 000000000..bcd8729ef --- /dev/null +++ b/plugins/php/versions/73/ioncube.sh @@ -0,0 +1,96 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` + +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=ioncube +LIBV=0 +sysName=`uname` +actionType=$1 +version=$2 +IC_VERSION=${version:0:1}.${version:1:2} + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} +extFile=${extDir}/${LIBNAME}.so + +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php-$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_lib + mkdir -p $php_lib + if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then + wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz + cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz + fi + cd $php_lib/ioncube + + cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile + fi + + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install ${LIBNAME}, Plese select other version!" + return + fi + + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/74/ioncube.sh b/plugins/php/versions/74/ioncube.sh new file mode 100755 index 000000000..bcd8729ef --- /dev/null +++ b/plugins/php/versions/74/ioncube.sh @@ -0,0 +1,96 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` + +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=ioncube +LIBV=0 +sysName=`uname` +actionType=$1 +version=$2 +IC_VERSION=${version:0:1}.${version:1:2} + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} +extFile=${extDir}/${LIBNAME}.so + +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php-$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_lib + mkdir -p $php_lib + if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then + wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz + cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz + fi + cd $php_lib/ioncube + + cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile + fi + + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install ${LIBNAME}, Plese select other version!" + return + fi + + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/phplib.conf b/plugins/php/versions/phplib.conf index 55fb68527..4fd4f3050 100755 --- a/plugins/php/versions/phplib.conf +++ b/plugins/php/versions/phplib.conf @@ -23,11 +23,22 @@ }, { "name": "ionCube", - "versions": [], + "versions": [ + "52", + "53", + "54", + "55", + "56", + "70", + "71", + "72", + "73", + "74" + ], "type": "脚本解密", "msg": "用于解密ionCube Encoder加密脚本!", "shell": "ioncube.sh", - "check": "ioncube_loader_lin" + "check": "ioncube.so" }, { "name": "opcache", diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 572c83044..34a8d63ce 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -67,7 +67,7 @@ if [ $OSNAME != "macos" ];then if [ ! -d /www/server/mdserver-web ];then wget -O /tmp/dev.zip https://github.com/midoks/mdserver-web/archive/refs/heads/dev.zip cd /tmp && unzip /tmp/dev.zip - mv -f /tmp/mdserver-web-master /www/server/mdserver-web + mv -f /tmp/mdserver-web-dev /www/server/mdserver-web rm -rf /tmp/dev.zip rm -rf /tmp/mdserver-web-dev fi diff --git a/scripts/lib.sh b/scripts/lib.sh index b7364666d..2ed03a3ab 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -255,6 +255,8 @@ else OSNAME='unknow' fi +VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` +echo "${OSNAME}:${VERSION_ID}" # system judge if [ "$OSNAME" == "macos" ]; then @@ -347,7 +349,6 @@ pip3 install --upgrade setuptools cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt pip3 install gunicorn==20.1.0 -pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 @@ -357,6 +358,10 @@ pip3 install psutil pip3 install flask-socketio==5.2.0 pip3 install mysqlclient +if [ "${OSNAME}" == "ubuntu" ] && [ "${VERSION_ID}" == "22.04" ];then + pip3 install -U --force-reinstall --no-binary :all: gevent +fi + if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate @@ -369,7 +374,6 @@ pip3 install --upgrade setuptools pip3 install -r /www/server/mdserver-web/requirements.txt pip3 install gunicorn==20.1.0 -pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 @@ -379,7 +383,9 @@ pip3 install psutil pip3 install flask-socketio==5.2.0 pip3 install mysqlclient - +if [ "${OSNAME}" == "ubuntu" ] && [ "${VERSION_ID}" == "22.04" ];then + pip3 install -U --force-reinstall --no-binary :all: gevent +fi ##### common start #####