From 4e65b91b1e811f982530da05b13679d6a22a268c Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 09:41:36 +0800 Subject: [PATCH 01/21] Update install_dev.sh --- scripts/install_dev.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 09797f40e9aeda61016539cdf4e06f4e9c7e6354 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 10:50:20 +0800 Subject: [PATCH 02/21] debug 5.5 --- plugins/mysql/versions/5.5/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mysql/versions/5.5/install.sh b/plugins/mysql/versions/5.5/install.sh index 659912f7c..6150ef87c 100755 --- a/plugins/mysql/versions/5.5/install.sh +++ b/plugins/mysql/versions/5.5/install.sh @@ -57,8 +57,8 @@ 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 From 0a6336619065b525cdf46c698889a6042d3d723e Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 10:50:47 +0800 Subject: [PATCH 03/21] =?UTF-8?q?ubuntu22=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/lib.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/lib.sh b/scripts/lib.sh index b7364666d..ca211991d 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -357,6 +357,10 @@ pip3 install psutil pip3 install flask-socketio==5.2.0 pip3 install mysqlclient +if [ "$OSNAME" == "ubuntu" ];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 @@ -380,6 +384,11 @@ pip3 install flask-socketio==5.2.0 pip3 install mysqlclient +if [ "$OSNAME" == "ubuntu" ];then + pip3 install -U --force-reinstall --no-binary :all: gevent +fi + + ##### common start ##### From 670aea2eaacd49f84229975b64e67f87d1c72237 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 10:51:54 +0800 Subject: [PATCH 04/21] Update install.sh --- plugins/openresty/install.sh | 2 ++ 1 file changed, 2 insertions(+) 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 #初始化 From 84d92e455768dadc46bd85ad124e8f16652c1e28 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 11:11:03 +0800 Subject: [PATCH 05/21] =?UTF-8?q?=E4=B8=8D=E8=83=BD=E7=9F=A5=E9=81=93?= =?UTF-8?q?=E5=8F=8D=E5=BA=94=E6=83=85=E5=86=B5=EF=BC=8C=E5=85=88=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mysql/versions/5.6/install.sh | 4 ++-- plugins/mysql/versions/5.7/install.sh | 2 +- plugins/mysql/versions/8.0/install.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/mysql/versions/5.6/install.sh b/plugins/mysql/versions/5.6/install.sh index 31f193176..b4392f034 100755 --- a/plugins/mysql/versions/5.6/install.sh +++ b/plugins/mysql/versions/5.6/install.sh @@ -61,8 +61,8 @@ 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 diff --git a/plugins/mysql/versions/5.7/install.sh b/plugins/mysql/versions/5.7/install.sh index 76376cb9a..f41cc2ca3 100755 --- a/plugins/mysql/versions/5.7/install.sh +++ b/plugins/mysql/versions/5.7/install.sh @@ -78,7 +78,7 @@ 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 + make clean && make && make install && make clean echo '5.7' > $serverPath/mysql/version.pl echo '安装完成' > $install_tmp fi diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index 6a29558c0..e6617ce89 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -79,7 +79,7 @@ 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 From c93e1a9a4551f8b8f007c8018ece73e34c5f58d1 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 11:22:24 +0800 Subject: [PATCH 06/21] Update plugins_api.py --- class/core/plugins_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/core/plugins_api.py b/class/core/plugins_api.py index ba3ff7c85..1d351eab0 100755 --- a/class/core/plugins_api.py +++ b/class/core/plugins_api.py @@ -125,7 +125,7 @@ class plugins_api: mw.M('tasks').add('id,name,type,status,addtime, execstr', taskAdd) # 任务执行相关 - isTask = mw.getRootDir() + '/tmp/panelTask.pl' + isTask = mw.getRunDir() + '/tmp/panelTask.pl' mw.writeFile(isTask, 'True') return mw.returnJson(True, '已将安装任务添加到队列!') From 9c1254b02b085476464604dddd216e80f15ecf2f Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 12:08:27 +0800 Subject: [PATCH 07/21] =?UTF-8?q?php55=20=E5=8A=A0=E5=85=A5ioncube?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/versions/55/ioncube.sh | 96 ++++++++++++++++++++++++++++++ plugins/php/versions/phplib.conf | 4 +- 2 files changed, 99 insertions(+), 1 deletion(-) create mode 100755 plugins/php/versions/55/ioncube.sh diff --git a/plugins/php/versions/55/ioncube.sh b/plugins/php/versions/55/ioncube.sh new file mode 100755 index 000000000..e5b7a8bc7 --- /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 [ ! -d $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 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 "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..64a1759be 100755 --- a/plugins/php/versions/phplib.conf +++ b/plugins/php/versions/phplib.conf @@ -23,7 +23,9 @@ }, { "name": "ionCube", - "versions": [], + "versions": [ + "55" + ], "type": "脚本解密", "msg": "用于解密ionCube Encoder加密脚本!", "shell": "ioncube.sh", From 2edc467b17850cb1b6566970cb2ff30fc03c8e27 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 12:23:12 +0800 Subject: [PATCH 08/21] =?UTF-8?q?mysql=E5=AE=89=E8=A3=85=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=BA=90=E6=96=87=E4=BB=B6=EF=BC=8C=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E9=87=8D=E5=AE=89=E8=A3=85=E6=97=B6=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mysql/install.sh | 2 +- plugins/mysql/versions/5.5/install.sh | 1 + plugins/mysql/versions/5.6/install.sh | 1 + plugins/mysql/versions/5.7/install.sh | 10 ++++++++-- plugins/mysql/versions/8.0/install.sh | 5 ++++- 5 files changed, 15 insertions(+), 4 deletions(-) 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 6150ef87c..b7d0a257d 100755 --- a/plugins/mysql/versions/5.5/install.sh +++ b/plugins/mysql/versions/5.5/install.sh @@ -64,6 +64,7 @@ Install_mysql() 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 b4392f034..4937df5aa 100755 --- a/plugins/mysql/versions/5.6/install.sh +++ b/plugins/mysql/versions/5.6/install.sh @@ -69,6 +69,7 @@ Install_mysql() 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 f41cc2ca3..b95f7a311 100755 --- a/plugins/mysql/versions/5.7/install.sh +++ b/plugins/mysql/versions/5.7/install.sh @@ -79,8 +79,14 @@ Install_mysql() -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ -DWITH_BOOST=${mysqlDir}/mysql-${VERSION}/boost/ make clean && make && make install && make clean - echo '5.7' > $serverPath/mysql/version.pl - echo '安装完成' > $install_tmp + + 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 e6617ce89..9603b6d4b 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -83,8 +83,11 @@ Install_mysql() 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 } From 8105f1aae1b26c2fd8ec645eb9f3b5cd9035f899 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 12:38:21 +0800 Subject: [PATCH 09/21] up --- scripts/install/ubuntu.sh | 12 ++++++++++++ scripts/lib.sh | 9 --------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 152c0bb4f..369fcaed6 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -64,6 +64,18 @@ cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data +pip3 install -U --force-reinstall --no-binary :all: gevent + +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 +else + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate +fi + +pip3 install -U --force-reinstall --no-binary :all: gevent + + cd /www/server/mdserver-web && ./cli.sh start sleep 5 diff --git a/scripts/lib.sh b/scripts/lib.sh index ca211991d..b7364666d 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -357,10 +357,6 @@ pip3 install psutil pip3 install flask-socketio==5.2.0 pip3 install mysqlclient -if [ "$OSNAME" == "ubuntu" ];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 @@ -384,11 +380,6 @@ pip3 install flask-socketio==5.2.0 pip3 install mysqlclient -if [ "$OSNAME" == "ubuntu" ];then - pip3 install -U --force-reinstall --no-binary :all: gevent -fi - - ##### common start ##### From 88161fb92054e513c2ddc62912f57bf6c159d58d Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 12:52:40 +0800 Subject: [PATCH 10/21] =?UTF-8?q?github=E8=BE=9B=E8=8B=A6=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/python-app-mysql55.yml | 38 +++++++++++++++++++ .github/workflows/python-app-mysql56.yml | 38 +++++++++++++++++++ .github/workflows/python-app-mysql57.yml | 38 +++++++++++++++++++ ...-app-mysql8.yml => python-app-mysql80.yml} | 0 4 files changed, 114 insertions(+) create mode 100644 .github/workflows/python-app-mysql55.yml create mode 100644 .github/workflows/python-app-mysql56.yml create mode 100644 .github/workflows/python-app-mysql57.yml rename .github/workflows/{python-app-mysql8.yml => python-app-mysql80.yml} (100%) diff --git a/.github/workflows/python-app-mysql55.yml b/.github/workflows/python-app-mysql55.yml new file mode 100644 index 000000000..245293f32 --- /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-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 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 From fb8f74226fa1a4f5235514a9815d00c34bba7c1a Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 12:57:20 +0800 Subject: [PATCH 11/21] Update install.sh --- plugins/php/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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} From a6c48bd79f4f7d5459f459d0a8a4d018bf4dd9d7 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 13:07:56 +0800 Subject: [PATCH 12/21] =?UTF-8?q?github=E8=BE=9B=E8=8B=A6=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/python-app-mysql55.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app-mysql55.yml b/.github/workflows/python-app-mysql55.yml index 245293f32..7b9635fed 100644 --- a/.github/workflows/python-app-mysql55.yml +++ b/.github/workflows/python-app-mysql55.yml @@ -16,7 +16,7 @@ jobs: build: strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-20.04, ubuntu-18.04, ubuntu-22.04] runs-on: ${{ matrix.os }} #runs-on: ubuntu-latest From 60956a59c01839611c5a13be4fffb10586790912 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 13:23:08 +0800 Subject: [PATCH 13/21] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=A7=A6=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/mw.py | 5 +++++ class/core/plugins_api.py | 3 +-- plugins/php/index.py | 2 ++ plugins/php/versions/55/ioncube.sh | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/class/core/mw.py b/class/core/mw.py index beb8347f8..85cc528c6 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 = mw.getRunDir() + '/tmp/panelTask.pl' + mw.writeFile(isTask, 'True') + + def getOs(): return sys.platform diff --git a/class/core/plugins_api.py b/class/core/plugins_api.py index 1d351eab0..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.getRunDir() + '/tmp/panelTask.pl' - mw.writeFile(isTask, 'True') + mw.triggerTask() return mw.returnJson(True, '已将安装任务添加到队列!') def uninstallOldApi(self): 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/versions/55/ioncube.sh b/plugins/php/versions/55/ioncube.sh index e5b7a8bc7..7d8812962 100755 --- a/plugins/php/versions/55/ioncube.sh +++ b/plugins/php/versions/55/ioncube.sh @@ -44,7 +44,7 @@ Install_lib() mkdir -p $php_lib if [ ! -d $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 ioncube_loaders_lin.tar.gz + cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz fi cd $php_lib/ioncube From e3fb8e3db77e974132652be8655fd810434133c8 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 13:35:32 +0800 Subject: [PATCH 14/21] up --- scripts/install/ubuntu.sh | 12 ------------ scripts/lib.sh | 12 +++++++++--- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 369fcaed6..152c0bb4f 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -64,18 +64,6 @@ cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data -pip3 install -U --force-reinstall --no-binary :all: gevent - -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 -else - cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate -fi - -pip3 install -U --force-reinstall --no-binary :all: gevent - - cd /www/server/mdserver-web && ./cli.sh start sleep 5 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 ##### From bfb37fef56bcc4df6e63335fe5a96d8f2dc8119a Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 13:46:29 +0800 Subject: [PATCH 15/21] Update mw.py --- class/core/mw.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class/core/mw.py b/class/core/mw.py index 85cc528c6..57bf3a9c4 100755 --- a/class/core/mw.py +++ b/class/core/mw.py @@ -89,8 +89,8 @@ def setBackupDir(bdir): def triggerTask(): - isTask = mw.getRunDir() + '/tmp/panelTask.pl' - mw.writeFile(isTask, 'True') + isTask = getRunDir() + '/tmp/panelTask.pl' + writeFile(isTask, 'True') def getOs(): From 3d6dda0d1728016217967aa62b26030278c71838 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 13:54:44 +0800 Subject: [PATCH 16/21] Update ioncube.sh --- plugins/php/versions/55/ioncube.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/php/versions/55/ioncube.sh b/plugins/php/versions/55/ioncube.sh index 7d8812962..2b688e9af 100755 --- a/plugins/php/versions/55/ioncube.sh +++ b/plugins/php/versions/55/ioncube.sh @@ -42,7 +42,7 @@ Install_lib() php_lib=$sourcePath/php_lib mkdir -p $php_lib - if [ ! -d $php_lib/ioncube_loaders_lin.tar.gz ];then + 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 From 158b679b053cbf8b07a8d608876fa57e0ea08698 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 13:56:27 +0800 Subject: [PATCH 17/21] Update phplib.conf --- plugins/php/versions/phplib.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/php/versions/phplib.conf b/plugins/php/versions/phplib.conf index 64a1759be..53e2c6d92 100755 --- a/plugins/php/versions/phplib.conf +++ b/plugins/php/versions/phplib.conf @@ -29,7 +29,7 @@ "type": "脚本解密", "msg": "用于解密ionCube Encoder加密脚本!", "shell": "ioncube.sh", - "check": "ioncube_loader_lin" + "check": "ioncube.so" }, { "name": "opcache", From 7cd65e6e6576e7bfd1de349577d5c0bb1b5878a3 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 13:57:16 +0800 Subject: [PATCH 18/21] Update ioncube.sh --- plugins/php/versions/55/ioncube.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/php/versions/55/ioncube.sh b/plugins/php/versions/55/ioncube.sh index 2b688e9af..bcd8729ef 100755 --- a/plugins/php/versions/55/ioncube.sh +++ b/plugins/php/versions/55/ioncube.sh @@ -58,7 +58,7 @@ Install_lib() echo "" >> $serverPath/php/$version/etc/php.ini echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "extension=${LIBNAME}.so" >> $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 '===========================================================' From f7e1e49106ec5f0a9958b9b8400694ccbcef6fcb Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 14:53:00 +0800 Subject: [PATCH 19/21] =?UTF-8?q?ionCube=20php52-php74=E5=85=A8=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/versions/52/ioncube.sh | 96 ++++++++++++++++++++++++++++++ plugins/php/versions/53/ioncube.sh | 96 ++++++++++++++++++++++++++++++ plugins/php/versions/54/ioncube.sh | 96 ++++++++++++++++++++++++++++++ plugins/php/versions/56/ioncube.sh | 96 ++++++++++++++++++++++++++++++ plugins/php/versions/70/ioncube.sh | 96 ++++++++++++++++++++++++++++++ plugins/php/versions/71/ioncube.sh | 96 ++++++++++++++++++++++++++++++ plugins/php/versions/72/ioncube.sh | 96 ++++++++++++++++++++++++++++++ plugins/php/versions/73/ioncube.sh | 96 ++++++++++++++++++++++++++++++ plugins/php/versions/74/ioncube.sh | 95 +++++++++++++++++++++++++++++ plugins/php/versions/phplib.conf | 11 +++- 10 files changed, 873 insertions(+), 1 deletion(-) create mode 100755 plugins/php/versions/52/ioncube.sh create mode 100755 plugins/php/versions/53/ioncube.sh create mode 100755 plugins/php/versions/54/ioncube.sh create mode 100755 plugins/php/versions/56/ioncube.sh create mode 100755 plugins/php/versions/70/ioncube.sh create mode 100755 plugins/php/versions/71/ioncube.sh create mode 100755 plugins/php/versions/72/ioncube.sh create mode 100755 plugins/php/versions/73/ioncube.sh create mode 100644 plugins/php/versions/74/ioncube.sh 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/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 100644 index 000000000..3471cc62a --- /dev/null +++ b/plugins/php/versions/74/ioncube.sh @@ -0,0 +1,95 @@ +#!/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 + + 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 53e2c6d92..4fd4f3050 100755 --- a/plugins/php/versions/phplib.conf +++ b/plugins/php/versions/phplib.conf @@ -24,7 +24,16 @@ { "name": "ionCube", "versions": [ - "55" + "52", + "53", + "54", + "55", + "56", + "70", + "71", + "72", + "73", + "74" ], "type": "脚本解密", "msg": "用于解密ionCube Encoder加密脚本!", From d098bc90f5de8496d18c102204328eae1c21ce2c Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 14:53:04 +0800 Subject: [PATCH 20/21] Update ioncube.sh --- plugins/php/versions/74/ioncube.sh | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 plugins/php/versions/74/ioncube.sh diff --git a/plugins/php/versions/74/ioncube.sh b/plugins/php/versions/74/ioncube.sh old mode 100644 new mode 100755 index 3471cc62a..bcd8729ef --- a/plugins/php/versions/74/ioncube.sh +++ b/plugins/php/versions/74/ioncube.sh @@ -22,6 +22,7 @@ NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-deb extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} extFile=${extDir}/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then BAK='_bak' else BAK='' From 41d54cc4c963437ed3a7f2a994124c899c12881c Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 15:03:06 +0800 Subject: [PATCH 21/21] Update all_test.sh --- plugins/php/all_test.sh | 132 ++++++---------------------------------- 1 file changed, 17 insertions(+), 115 deletions(-) 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