From 4a6c88101888029a3176e85dedb31d56c6ab4814 Mon Sep 17 00:00:00 2001 From: soxft Date: Thu, 30 Jun 2022 07:26:13 +0000 Subject: [PATCH 001/263] feta: add proxy conf nginx.conf --- class/core/site_api.py | 28 ++++++++++------ data/tpl/nginx.conf | 6 +++- route/static/app/site.js | 72 +++++++++++++++++----------------------- 3 files changed, 53 insertions(+), 53 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index 1f8c7a7f5..4de502389 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -43,6 +43,11 @@ class site_api: if not os.path.exists(self.redirectPath): mw.execShell("mkdir -p " + self.redirectPath + " && chmod -R 755 " + self.redirectPath) + + self.proxyPath = self.setupPath + '/nginx/proxy' + if not os.path.exists(self.proxyPath): + mw.execShell("mkdir -p " + self.proxyPath + + " && chmod -R 755 " + self.proxyPath) self.logsPath = mw.getRootDir() + '/wwwlogs' # ssl conf @@ -1337,21 +1342,15 @@ class site_api: return mw.returnJson(False, "删除失败!") return mw.returnJson(True, "删除成功!") + # 读取 网站 反向代理列表 def getProxyListApi(self): siteName = request.form.get('siteName', '') conf_path = self.getHostConf(siteName) old_conf = mw.readFile(conf_path) - rep = "(#PROXY-START(\n|.)+#PROXY-END)" - url_rep = "proxy_pass (.*);|ProxyPass\s/\s(.*)|Host\s(.*);" - host_rep = "Host\s(.*);" - - proxyUrl = self.__read_config(self.__proxyfile) - sitename = sitename - proxylist = [] - for i in proxyUrl: - if i["sitename"] == sitename: - proxylist.append(i) - return mw.getJson(proxylist) + + return mw.returnJson(True, "ok", { + "conf_content": old_conf + }) def getSiteTypesApi(self): # 取网站分类 @@ -1509,6 +1508,12 @@ class site_api: def getRedirectPath(self, siteName): return "{}/{}/".format(self.redirectPath, siteName) + + def getProxytDataPath(self, siteName): + return "{}/{}/data.json".format(self.proxyPath, siteName) + + def getProxyDataPath(self, siteName): + return "{}/{}/data.json".format(self.proxyPath, siteName) def getDirBindRewrite(self, siteName, dirname): return self.rewritePath + '/' + siteName + '_' + dirname + '.conf' @@ -1808,6 +1813,7 @@ class site_api: content = content.replace('{$PHPVER}', self.phpVersion) content = content.replace('{$OR_REWRITE}', self.rewritePath) content = content.replace('{$OR_REDIRECT}', self.redirectPath) + content = content.replace('{$OR_PROXY}', self.proxyPath) logsPath = mw.getLogsDir() content = content.replace('{$LOGPATH}', logsPath) diff --git a/data/tpl/nginx.conf b/data/tpl/nginx.conf index 504cc6e8b..cb7c79ad3 100755 --- a/data/tpl/nginx.conf +++ b/data/tpl/nginx.conf @@ -24,7 +24,11 @@ server #301-START include {$OR_REDIRECT}/{$SERVER_NAME}/*.conf; - ##301-END + #301-END + + #PROXY-START + include {$OR_PROXY}/{$SERVER_NAME}/*.conf; + #PROXY-END #禁止访问的文件或目录 location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md) diff --git a/route/static/app/site.js b/route/static/app/site.js index 02e7866b8..9ad7e4432 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -994,7 +994,7 @@ function webEdit(id,website,endTime,addtime){ +"

SSL

" +"

PHP版本

" +"

重定向

" - +"

反向代理

" + +"

反向代理

" +"

防盗链

" +"

响应日志

"; layer.open({ @@ -1367,48 +1367,38 @@ function delDirBind(id,siteId){ } //反向代理 -function proxyList(siteName,type){ - if(type == 1){ - type = $("input[name='status']").attr('checked')?'0':'1'; - toUrl = encodeURIComponent($("input[name='toUrl']").val()); - toDomain = encodeURIComponent($("input[name='toDomain']").val()); - var sub1 = encodeURIComponent($("input[name='sub1']").val()); - var sub2 = encodeURIComponent($("input[name='sub2']").val()); - var data = 'name='+siteName+'&type='+type+'&proxyUrl='+toUrl+'&toDomain=' + toDomain + '&sub1=' + sub1 + '&sub2=' + sub2; - var loadT = layer.msg(lan.public.the,{icon:16,time:0,shade: [0.3, '#000']}); - $.post('/site?action=SetProxy',data,function(rdata){ - layer.close(loadT); - if(rdata.status) { - Proxy(siteName); - }else{ - $("input[name='status']").attr('checked',false) - } - layer.msg(rdata.msg,{icon:rdata.status?1:2}); - }); +function toProxy(siteName, type, obj) { + if (type == 1) { + return; } - var loadT = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']}); - $.post('/site?action=GetProxy','name='+siteName,function(rdata){ - layer.close(loadT); - if(rdata.proxyUrl == null) rdata.proxyUrl = ''; - var status_selected = rdata.status?'checked':''; - var disabled = rdata.status?'disabled':''; - var body = "
" - +"

"+lan.site.proxy_url+"

" - +"

"+lan.site.proxy_domain+"

" - +"

"+lan.site.con_rep+"" - +"

" - +'
' - +'' - +"
"; - $("#webedit-con").html(body); - }); + + var body = '
\ +
\ + \ +
\ +
\ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +
代理目录目标地址操作
\ +
\ +
'; + $("#webedit-con").html(body); + var loading = layer.load() + $.post("/site/get_proxy_list", { + siteName: siteName + },function (res) { + var res = JSON.parse(res) + console.log(res) + }) } //开启缓存 From 4aca759b5d42cf44a5c39f8b580879117a98830b Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 16:16:55 +0800 Subject: [PATCH 002/263] up --- plugins/mysql/versions/5.5/install.sh | 2 +- plugins/mysql/versions/5.6/install.sh | 2 +- plugins/mysql/versions/5.7/install.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/mysql/versions/5.5/install.sh b/plugins/mysql/versions/5.5/install.sh index b7d0a257d..eec5fc632 100755 --- a/plugins/mysql/versions/5.5/install.sh +++ b/plugins/mysql/versions/5.5/install.sh @@ -34,7 +34,7 @@ Install_mysql() fi if [ ! -f ${mysqlDir}/mysql-5.5.62.tar.gz ];then - wget -O ${mysqlDir}/mysql-5.5.62.tar.gz https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.62.tar.gz + wget -O ${mysqlDir}/mysql-5.5.62.tar.gz --tries=3 https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.62.tar.gz fi if [ ! -d ${mysqlDir}/mysql-5.5.62 ];then diff --git a/plugins/mysql/versions/5.6/install.sh b/plugins/mysql/versions/5.6/install.sh index 4937df5aa..790360d73 100755 --- a/plugins/mysql/versions/5.6/install.sh +++ b/plugins/mysql/versions/5.6/install.sh @@ -38,7 +38,7 @@ Install_mysql() if [ ! -f ${mysqlDir}/mysql-5.6.50.tar.gz ];then - wget -O ${mysqlDir}/mysql-5.6.50.tar.gz https://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.50.tar.gz + wget -O ${mysqlDir}/mysql-5.6.50.tar.gz --tries=3 https://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.50.tar.gz fi if [ ! -d ${mysqlDir}/mysql-5.6.50 ];then diff --git a/plugins/mysql/versions/5.7/install.sh b/plugins/mysql/versions/5.7/install.sh index b95f7a311..8c374cca0 100755 --- a/plugins/mysql/versions/5.7/install.sh +++ b/plugins/mysql/versions/5.7/install.sh @@ -40,7 +40,7 @@ Install_mysql() if [ ! -f ${mysqlDir}/mysql-boost-${VERSION}.tar.gz ];then - wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-${VERSION}.tar.gz + wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz --tries=3 https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-${VERSION}.tar.gz fi #检测文件是否损坏. @@ -52,7 +52,7 @@ Install_mysql() else # 重新下载 rm -rf ${mysqlDir}/mysql-${VERSION} - wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-${VERSION}.tar.gz + wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz --tries=3 https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-${VERSION}.tar.gz fi fi From 5bc3ee2b7cdf67a2c4a1fa690d06da779a273294 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 19:19:55 +0800 Subject: [PATCH 003/263] Update files_api.py --- class/core/files_api.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/class/core/files_api.py b/class/core/files_api.py index 8f7974d8f..6ffd23be0 100755 --- a/class/core/files_api.py +++ b/class/core/files_api.py @@ -210,7 +210,6 @@ class files_api: try: name = mw.M('tasks').where('id=?', (mid,)).getField('name') status = mw.M('tasks').where('id=?', (mid,)).getField('status') - # print(name, status) mw.M('tasks').delete(mid) if status == '-1': task_pid = mw.execShell( @@ -220,8 +219,7 @@ class files_api: for i in range(len(task_list)): self.removeTaskRecursion(task_list[i]) - isTask = mw.getRootDir() + '/tmp/panelTask.pl' - mw.writeFile(isTask, 'True') + mw.triggerTask() system_api.system_api().restartTask() except: system_api.system_api().restartTask() From c9a068241bc0f46b74150ca2b7b5710c0d040378 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 19:31:17 +0800 Subject: [PATCH 004/263] Update all_test.sh --- plugins/php/all_test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/php/all_test.sh b/plugins/php/all_test.sh index 3a38e8553..04feb077f 100644 --- a/plugins/php/all_test.sh +++ b/plugins/php/all_test.sh @@ -20,19 +20,19 @@ done echo "php${PHP_VER} -- end" - 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 + for ii in $cmd_ext do + echo "${ii}" if [ "install.sh" == "$ii" ];then echo '' > /tmp/t.log else - cd $DIR/versions/$PHP_VER && bash $ii install ${PHP_VER} + cd $DIR/versions/$PHP_VER/ && bash $ii install ${PHP_VER} fi done fi From bd14b88c00d85a2a34aed2766bbbd023e816ea9f Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 19:34:57 +0800 Subject: [PATCH 005/263] Create exif.sh --- plugins/php/versions/53/exif.sh | 105 ++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100755 plugins/php/versions/53/exif.sh diff --git a/plugins/php/versions/53/exif.sh b/plugins/php/versions/53/exif.sh new file mode 100755 index 000000000..f52c194c5 --- /dev/null +++ b/plugins/php/versions/53/exif.sh @@ -0,0 +1,105 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` + +appPath=$(dirname "$curPath") + +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +actionType=$1 +version=$2 + +LIBNAME=exif +LIBV=0 + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so + +sysName=`uname` +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 + + if [ ! -d $sourcePath/php${version}/ext ];then + cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} + fi + + cd $sourcePath/php${version}/ext/${LIBNAME} + + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config + + FIND_C99=`cat Makefile|grep c99` + if [ "$FIND_C99" == "" ];then + sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile + fi + + + make && make install && make clean + + 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},请选择其它版本!" + return + fi + + echo $serverPath/php/$version/etc/php.ini + 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 From 90dfcf7d7a0c329be135fc076bd04dfd8721c22b Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 19:43:17 +0800 Subject: [PATCH 006/263] Update index.py --- plugins/php/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index 6db5faba6..bd556eaee 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -675,7 +675,7 @@ def installLib(version): name + '.sh' + ' install ' + version rettime = time.strftime('%Y-%m-%d %H:%M:%S') - insert_info = (None, '安装[' + name + '-' + version + ']', + insert_info = (None, '安装[' + name + '-PHP' + version + ']', 'execshell', '0', rettime, execstr) mw.M('tasks').add('id,name,type,status,addtime,execstr', insert_info) From 1630095d78da8a52400530e36cd1bbc3ca677de3 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 20:45:48 +0800 Subject: [PATCH 007/263] up --- plugins/php/lib/libmemcached.sh | 26 ++++++++++++++++++++++++++ scripts/lib.sh | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 plugins/php/lib/libmemcached.sh diff --git a/plugins/php/lib/libmemcached.sh b/plugins/php/lib/libmemcached.sh new file mode 100644 index 000000000..680aef46d --- /dev/null +++ b/plugins/php/lib/libmemcached.sh @@ -0,0 +1,26 @@ +#!/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") + +# echo $rootPath + +SERVER_ROOT=$rootPath/lib +SOURCE_ROOT=$rootPath/source/lib + +#----------------------------- libmemcached start -------------------------# +if [ ! -d ${SERVER_ROOT}/libmemcached ];then + cd ${SOURCE_ROOT} + if [ ! -f ${SOURCE_ROOT}/libmemcached-1.0.4.tar.gz ];then + wget -O libmemcached-1.0.4.tar.gz https://launchpad.net/libmemcached/1.0/1.0.4/+download/libmemcached-1.0.4.tar.gz -T 20 + fi + tar -zxf libmemcached-1.0.4.tar.gz + cd libmemcached-1.0.4 + ./configure --prefix=${SERVER_ROOT}/libmemcached -with-memcached && make && make install +fi +#----------------------------- libmemcached end -------------------------# \ No newline at end of file diff --git a/scripts/lib.sh b/scripts/lib.sh index 2ed03a3ab..3c49e986f 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -277,11 +277,13 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y cmake automake make apt install -y webp scons + apt install -y libwebp-dev apt install -y lzma lzma-dev apt install -y libunwind-dev apt install -y libpcre3 libpcre3-dev apt install -y openssl + apt install -y imagemagick apt install -y libxml2 libxml2-dev libbz2-dev libmcrypt-dev libpspell-dev librecode-dev apt install -y libgmp-dev libgmp3-dev libreadline-dev libxpm-dev From 2a9ecd9e4cabd33f8a8cb149e7270b7fdf12aebf Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 20:56:00 +0800 Subject: [PATCH 008/263] Update all_test.sh --- plugins/php/all_test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/php/all_test.sh b/plugins/php/all_test.sh index 04feb077f..fc51ec3d7 100644 --- a/plugins/php/all_test.sh +++ b/plugins/php/all_test.sh @@ -5,6 +5,8 @@ DIR=$(cd "$(dirname "$0")"; pwd) # cd /www/server/mdserver-web/plugins/php && bash all_test.sh +# cd /www/server/mdserver-web/plugins/php/versions/71/ && bash openssl.sh install 71 + PHP_VER=53 echo "php${PHP_VER} -- start" cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}') @@ -20,7 +22,7 @@ done echo "php${PHP_VER} -- end" -PHP_VER_LIST=(54 55 56 71 72 73 74 80 81) +PHP_VER_LIST=(54 55 56 70 71 72 73 74 80 81) # PHP_VER_LIST=(81) for PHP_VER in ${PHP_VER_LIST[@]}; do echo "php${PHP_VER} -- start" From 1ce9ec23d063b70d473402774b54764d1b5a0581 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 21:14:14 +0800 Subject: [PATCH 009/263] =?UTF-8?q?yaf=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/lib/libmemcached.sh | 2 ++ plugins/php/versions/70/yaf.sh | 2 +- plugins/php/versions/71/yaf.sh | 2 +- plugins/php/versions/72/yaf.sh | 2 +- plugins/php/versions/73/yaf.sh | 2 +- plugins/php/versions/74/yaf.sh | 2 +- plugins/php/versions/80/yaf.sh | 2 +- plugins/php/versions/81/yaf.sh | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/plugins/php/lib/libmemcached.sh b/plugins/php/lib/libmemcached.sh index 680aef46d..76297d853 100644 --- a/plugins/php/lib/libmemcached.sh +++ b/plugins/php/lib/libmemcached.sh @@ -10,6 +10,8 @@ rootPath=$(dirname "$rootPath") # echo $rootPath +# cd /www/server/mdserver-web/plugins/php/lib && /bin/bash libmemcached.sh + SERVER_ROOT=$rootPath/lib SOURCE_ROOT=$rootPath/source/lib diff --git a/plugins/php/versions/70/yaf.sh b/plugins/php/versions/70/yaf.sh index c82c102a0..0b3a89485 100755 --- a/plugins/php/versions/70/yaf.sh +++ b/plugins/php/versions/70/yaf.sh @@ -18,7 +18,7 @@ version=$2 sysName=`uname` LIBNAME=yaf -LIBV=3.2.5 +LIBV=3.3.5 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/plugins/php/versions/71/yaf.sh b/plugins/php/versions/71/yaf.sh index f5d2c9a88..1e224d8f3 100755 --- a/plugins/php/versions/71/yaf.sh +++ b/plugins/php/versions/71/yaf.sh @@ -15,7 +15,7 @@ actionType=$1 version=$2 LIBNAME=yaf -LIBV=3.2.5 +LIBV=3.3.5 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/plugins/php/versions/72/yaf.sh b/plugins/php/versions/72/yaf.sh index e10fcef0c..e14b8a79d 100755 --- a/plugins/php/versions/72/yaf.sh +++ b/plugins/php/versions/72/yaf.sh @@ -15,7 +15,7 @@ actionType=$1 version=$2 LIBNAME=yaf -LIBV=3.2.5 +LIBV=3.3.5 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` diff --git a/plugins/php/versions/73/yaf.sh b/plugins/php/versions/73/yaf.sh index 071ecaa34..4c7742f87 100755 --- a/plugins/php/versions/73/yaf.sh +++ b/plugins/php/versions/73/yaf.sh @@ -15,7 +15,7 @@ actionType=$1 version=$2 LIBNAME=yaf -LIBV=3.2.5 +LIBV=3.3.5 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/plugins/php/versions/74/yaf.sh b/plugins/php/versions/74/yaf.sh index 071ecaa34..4c7742f87 100755 --- a/plugins/php/versions/74/yaf.sh +++ b/plugins/php/versions/74/yaf.sh @@ -15,7 +15,7 @@ actionType=$1 version=$2 LIBNAME=yaf -LIBV=3.2.5 +LIBV=3.3.5 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/plugins/php/versions/80/yaf.sh b/plugins/php/versions/80/yaf.sh index a74c212ac..f420ee14c 100755 --- a/plugins/php/versions/80/yaf.sh +++ b/plugins/php/versions/80/yaf.sh @@ -15,7 +15,7 @@ actionType=$1 version=$2 LIBNAME=yaf -LIBV=3.3.0 +LIBV=3.3.5 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` diff --git a/plugins/php/versions/81/yaf.sh b/plugins/php/versions/81/yaf.sh index 0eebee9fd..f420ee14c 100755 --- a/plugins/php/versions/81/yaf.sh +++ b/plugins/php/versions/81/yaf.sh @@ -15,7 +15,7 @@ actionType=$1 version=$2 LIBNAME=yaf -LIBV=3.2.5 +LIBV=3.3.5 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` From e8926d3bf0de38bc2a27878765f24f493f12f12c Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 22:15:16 +0800 Subject: [PATCH 010/263] =?UTF-8?q?swoole=E6=9B=B4=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/versions/72/swoole.sh | 2 +- plugins/php/versions/73/swoole.sh | 2 +- plugins/php/versions/74/swoole.sh | 2 +- plugins/php/versions/80/swoole.sh | 2 +- plugins/php/versions/81/swoole.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/php/versions/72/swoole.sh b/plugins/php/versions/72/swoole.sh index 333707bbd..7d11372da 100755 --- a/plugins/php/versions/72/swoole.sh +++ b/plugins/php/versions/72/swoole.sh @@ -16,7 +16,7 @@ version=$2 LIBNAME=swoole -LIBV=4.5.2 +LIBV=4.8.10 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/plugins/php/versions/73/swoole.sh b/plugins/php/versions/73/swoole.sh index 5db5d34b2..46a981273 100755 --- a/plugins/php/versions/73/swoole.sh +++ b/plugins/php/versions/73/swoole.sh @@ -15,7 +15,7 @@ actionType=$1 version=$2 LIBNAME=swoole -LIBV=4.5.2 +LIBV=4.8.10 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/plugins/php/versions/74/swoole.sh b/plugins/php/versions/74/swoole.sh index 1ca2c0d7f..8d80d4d5f 100755 --- a/plugins/php/versions/74/swoole.sh +++ b/plugins/php/versions/74/swoole.sh @@ -15,7 +15,7 @@ actionType=$1 version=$2 LIBNAME=swoole -LIBV=4.5.2 +LIBV=4.8.10 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` diff --git a/plugins/php/versions/80/swoole.sh b/plugins/php/versions/80/swoole.sh index f599d070e..c3711d6ad 100755 --- a/plugins/php/versions/80/swoole.sh +++ b/plugins/php/versions/80/swoole.sh @@ -16,7 +16,7 @@ version=$2 LIBNAME=swoole -LIBV=4.6.3 +LIBV=4.8.10 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/plugins/php/versions/81/swoole.sh b/plugins/php/versions/81/swoole.sh index f599d070e..c3711d6ad 100755 --- a/plugins/php/versions/81/swoole.sh +++ b/plugins/php/versions/81/swoole.sh @@ -16,7 +16,7 @@ version=$2 LIBNAME=swoole -LIBV=4.6.3 +LIBV=4.8.10 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so From b167bae1980c85de208058ee9b830d2bd8186543 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 22:28:29 +0800 Subject: [PATCH 011/263] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E7=AD=89=E5=BE=85=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cli.sh | 9 +++++++-- scripts/install/alma.sh | 20 +++++++++++++++++--- scripts/install/centos.sh | 19 ++++++++++++++++--- scripts/install/debian.sh | 20 +++++++++++++++++--- scripts/install/fedora.sh | 18 ++++++++++++++---- scripts/install/rocky.sh | 18 ++++++++++++++---- scripts/install/ubuntu.sh | 19 ++++++++++++++++--- 7 files changed, 101 insertions(+), 22 deletions(-) diff --git a/cli.sh b/cli.sh index abc5d49fc..f38e77abb 100755 --- a/cli.sh +++ b/cli.sh @@ -18,7 +18,6 @@ mw_start(){ mw_start_debug(){ - python3 task.py >> $DIR/logs/task.log 2>&1 & gunicorn -b :7200 -k gevent -w 1 app:app } @@ -36,7 +35,13 @@ mw_stop() do kill -9 $i done - ps -ef|grep task.py |grep -v grep|awk '{print $2}'|xargs kill -9 + + pids=`ps -ef|grep task.py | grep -v grep |awk '{print $2}'` + arr=($pids) + for p in ${arr[@]} + do + kill -9 $p + done } case "$1" in diff --git a/scripts/install/alma.sh b/scripts/install/alma.sh index d7ddc4136..1e70f2e15 100755 --- a/scripts/install/alma.sh +++ b/scripts/install/alma.sh @@ -86,10 +86,24 @@ chmod 755 /www/server/mdserver-web/data cd /www/server/mdserver-web && ./cli.sh start -sleep 5 +isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` +n=0 +while [[ ! -f /etc/init.d/mw ]]; +do + echo -e ".\c" + sleep 1 + let n+=1 + if [ $n -gt 20 ];then + echo -e "start mw fail" + exit 1 + fi +done -cd /www/server/mdserver-web && ./cli.sh stop -cd /www/server/mdserver-web && ./scripts/init.d/mw default +cd /www/server/mdserver-web && /etc/init.d/mw stop cd /www/server/mdserver-web && /etc/init.d/mw start +cd /www/server/mdserver-web && /etc/init.d/mw default + + + diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index e2b548a1f..ffc3aa855 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -95,10 +95,23 @@ chmod 755 /www/server/mdserver-web/data cd /www/server/mdserver-web && ./cli.sh start -sleep 5 +isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` +n=0 +while [[ ! -f /etc/init.d/mw ]]; +do + echo -e ".\c" + sleep 1 + let n+=1 + if [ $n -gt 20 ];then + echo -e "start mw fail" + exit 1 + fi +done -cd /www/server/mdserver-web && ./cli.sh stop -cd /www/server/mdserver-web && ./scripts/init.d/mw default +cd /www/server/mdserver-web && /etc/init.d/mw stop cd /www/server/mdserver-web && /etc/init.d/mw start +cd /www/server/mdserver-web && /etc/init.d/mw default + + diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index 8d36831f4..ea3761dd6 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -104,11 +104,25 @@ chmod 755 /www/server/mdserver-web/data cd /www/server/mdserver-web && ./cli.sh start -sleep 5 +isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` +n=0 +while [[ ! -f /etc/init.d/mw ]]; +do + echo -e ".\c" + sleep 1 + let n+=1 + if [ $n -gt 20 ];then + echo -e "start mw fail" + exit 1 + fi +done -cd /www/server/mdserver-web && ./cli.sh stop -cd /www/server/mdserver-web && ./scripts/init.d/mw default +cd /www/server/mdserver-web && /etc/init.d/mw stop cd /www/server/mdserver-web && /etc/init.d/mw start +cd /www/server/mdserver-web && /etc/init.d/mw default + + + diff --git a/scripts/install/fedora.sh b/scripts/install/fedora.sh index feec8833d..fbba069c6 100644 --- a/scripts/install/fedora.sh +++ b/scripts/install/fedora.sh @@ -85,12 +85,22 @@ cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data - cd /www/server/mdserver-web && ./cli.sh start -sleep 5 +isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` +n=0 +while [[ ! -f /etc/init.d/mw ]]; +do + echo -e ".\c" + sleep 1 + let n+=1 + if [ $n -gt 20 ];then + echo -e "start mw fail" + exit 1 + fi +done -cd /www/server/mdserver-web && ./cli.sh stop -cd /www/server/mdserver-web && ./scripts/init.d/mw default +cd /www/server/mdserver-web && /etc/init.d/mw stop cd /www/server/mdserver-web && /etc/init.d/mw start +cd /www/server/mdserver-web && /etc/init.d/mw default diff --git a/scripts/install/rocky.sh b/scripts/install/rocky.sh index 7d1b6c925..c4cbcf1b5 100644 --- a/scripts/install/rocky.sh +++ b/scripts/install/rocky.sh @@ -84,11 +84,21 @@ chmod 755 /www/server/mdserver-web/data cd /www/server/mdserver-web && ./cli.sh start -sleep 5 +isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` +n=0 +while [[ ! -f /etc/init.d/mw ]]; +do + echo -e ".\c" + sleep 1 + let n+=1 + if [ $n -gt 20 ];then + echo -e "start mw fail" + exit 1 + fi +done -cd /www/server/mdserver-web && ./cli.sh stop -cd /www/server/mdserver-web && ./scripts/init.d/mw default +cd /www/server/mdserver-web && /etc/init.d/mw stop cd /www/server/mdserver-web && /etc/init.d/mw start - +cd /www/server/mdserver-web && /etc/init.d/mw default diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 152c0bb4f..0e143a4cf 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -66,9 +66,22 @@ chmod 755 /www/server/mdserver-web/data cd /www/server/mdserver-web && ./cli.sh start -sleep 5 +isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` +n=0 +while [[ ! -f /etc/init.d/mw ]]; +do + echo -e ".\c" + sleep 1 + let n+=1 + if [ $n -gt 20 ];then + echo -e "start mw fail" + exit 1 + fi +done -cd /www/server/mdserver-web && ./cli.sh stop -cd /www/server/mdserver-web && ./scripts/init.d/mw default +cd /www/server/mdserver-web && /etc/init.d/mw stop cd /www/server/mdserver-web && /etc/init.d/mw start +cd /www/server/mdserver-web && /etc/init.d/mw default + + From f397db2c6ff143a904a7f347fbaa17d53d43137b Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 22:34:34 +0800 Subject: [PATCH 012/263] Update centos.sh --- scripts/install/centos.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index ffc3aa855..de18732a0 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -114,4 +114,3 @@ cd /www/server/mdserver-web && /etc/init.d/mw default - From fb14df91324a85c942675e3b20b5a59587dcb403 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 23:20:41 +0800 Subject: [PATCH 013/263] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dphp=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?phpinfo=E7=9A=84=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/conf/phpinfo.conf | 2 +- plugins/php/index.py | 26 +++++++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/plugins/php/conf/phpinfo.conf b/plugins/php/conf/phpinfo.conf index 223441d3f..577a70ec0 100644 --- a/plugins/php/conf/phpinfo.conf +++ b/plugins/php/conf/phpinfo.conf @@ -1,4 +1,4 @@ location /{$PHP_VERSION} { root {$ROOT_PATH}/phpinfo; - include enable-php-{$PHP_VERSION}.conf; + include {$SERVER_PATH}/web_conf/php/conf/enable-php-{$PHP_VERSION}.conf; } \ No newline at end of file diff --git a/plugins/php/index.py b/plugins/php/index.py index bd556eaee..0d73308d5 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -605,30 +605,34 @@ def setDisableFunc(version): def checkPhpinfoFile(v): - if mw.isInstalledWeb(): - sdir = mw.getServerDir() - dfile = sdir + '/openresty/nginx/conf/php_status/phpinfo_' + v + '.conf' - if not os.path.exists(dfile): - tpl = getPluginDir() + '/conf/phpinfo.conf' - content = mw.readFile(tpl) - content = contentReplace(content, v) - mw.writeFile(dfile, content) - mw.restartWeb() + sdir = mw.getServerDir() + dfile = sdir + '/web_conf/php/status/phpinfo_' + v + '.conf' + if not os.path.exists(dfile): + tpl = getPluginDir() + '/conf/phpinfo.conf' + content = mw.readFile(tpl) + content = contentReplace(content, v) + mw.writeFile(dfile, content) + mw.restartWeb() def getPhpinfo(v): checkPhpinfoFile(v) sPath = mw.getRootDir() + '/phpinfo/' + v - mw.execShell("rm -rf " + mw.getRootDir() + '/phpinfo') + + # mw.execShell("rm -rf " + mw.getRootDir() + '/phpinfo') mw.execShell("mkdir -p " + sPath) mw.writeFile(sPath + '/phpinfo.php', '') url = 'http://127.0.0.1/' + v + '/phpinfo.php' phpinfo = mw.httpGet(url) - os.system("rm -rf " + mw.getRootDir() + '/phpinfo') + # os.system("rm -rf " + mw.getRootDir() + '/phpinfo') + + print(mw.getRootDir() + '/phpinfo', sPath, url) return phpinfo def get_php_info(args): + if not mw.isInstalledWeb(): + return "openresty is not running!!!" return getPhpinfo(args['version']) From a7e0f282166279a9f15a92ec6b3d49d47245b323 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 30 Jun 2022 23:21:58 +0800 Subject: [PATCH 014/263] Update index.py --- plugins/php/index.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index 0d73308d5..069230fdd 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -619,14 +619,12 @@ def getPhpinfo(v): checkPhpinfoFile(v) sPath = mw.getRootDir() + '/phpinfo/' + v - # mw.execShell("rm -rf " + mw.getRootDir() + '/phpinfo') + mw.execShell("rm -rf " + mw.getRootDir() + '/phpinfo') mw.execShell("mkdir -p " + sPath) mw.writeFile(sPath + '/phpinfo.php', '') url = 'http://127.0.0.1/' + v + '/phpinfo.php' phpinfo = mw.httpGet(url) - # os.system("rm -rf " + mw.getRootDir() + '/phpinfo') - - print(mw.getRootDir() + '/phpinfo', sPath, url) + os.system("rm -rf " + mw.getRootDir() + '/phpinfo') return phpinfo From d1e97cc8e4512752ba99bc8272a5f38fe3092615 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 00:39:43 +0800 Subject: [PATCH 015/263] Update zendguardloader.sh --- plugins/php/versions/56/zendguardloader.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/php/versions/56/zendguardloader.sh b/plugins/php/versions/56/zendguardloader.sh index c746acd9f..976101749 100755 --- a/plugins/php/versions/56/zendguardloader.sh +++ b/plugins/php/versions/56/zendguardloader.sh @@ -31,7 +31,8 @@ Install_lib() fi NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` - extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so + extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} + extFile=${extDir}/${LIBNAME}.so if [ ! -f "$extFile" ];then @@ -45,8 +46,8 @@ Install_lib() fi cd $php_lib && tar xvf zend-loader-php5.6.tar.gz - cd zend-loader-php5.6* - cp ZendGuardLoader.so $serverPath/php/$version/lib/php/extensions/no-debug-non-zts-20131226/ + cd zend-loader-php5.6-* + cp ZendGuardLoader.so ${extDir} fi From 5c25ddc3fd9d7eacaee08148b8d5f3b9e49db707 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 01:24:52 +0800 Subject: [PATCH 016/263] up --- plugins/php/all_test.sh | 1 + plugins/php/versions/70/imagemagick.sh | 2 +- plugins/php/versions/70/yac.sh | 2 +- plugins/php/versions/71/imagemagick.sh | 2 +- plugins/php/versions/71/yac.sh | 2 +- plugins/php/versions/72/imagemagick.sh | 2 +- plugins/php/versions/72/yac.sh | 2 +- plugins/php/versions/73/imagemagick.sh | 2 +- plugins/php/versions/73/yac.sh | 2 +- plugins/php/versions/74/imagemagick.sh | 2 +- plugins/php/versions/74/yac.sh | 2 +- plugins/php/versions/80/imagemagick.sh | 2 +- plugins/php/versions/80/yac.sh | 2 +- plugins/php/versions/81/imagemagick.sh | 2 +- plugins/php/versions/81/memcached.sh | 2 +- plugins/php/versions/81/yac.sh | 2 +- scripts/lib.sh | 4 +++- 17 files changed, 19 insertions(+), 16 deletions(-) diff --git a/plugins/php/all_test.sh b/plugins/php/all_test.sh index fc51ec3d7..b1320db99 100644 --- a/plugins/php/all_test.sh +++ b/plugins/php/all_test.sh @@ -6,6 +6,7 @@ DIR=$(cd "$(dirname "$0")"; pwd) # cd /www/server/mdserver-web/plugins/php && bash all_test.sh # cd /www/server/mdserver-web/plugins/php/versions/71/ && bash openssl.sh install 71 +# cd /www/server/mdserver-web/plugins/php/versions/81/ && bash imagemagick.sh install 81 PHP_VER=53 echo "php${PHP_VER} -- start" diff --git a/plugins/php/versions/70/imagemagick.sh b/plugins/php/versions/70/imagemagick.sh index fde729fad..7490287e6 100755 --- a/plugins/php/versions/70/imagemagick.sh +++ b/plugins/php/versions/70/imagemagick.sh @@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=imagick -LIBV=3.6.0 +LIBV=3.7.0 sysName=`uname` actionType=$1 version=$2 diff --git a/plugins/php/versions/70/yac.sh b/plugins/php/versions/70/yac.sh index 46292d91d..2687801c0 100755 --- a/plugins/php/versions/70/yac.sh +++ b/plugins/php/versions/70/yac.sh @@ -17,7 +17,7 @@ version=$2 sysName=`uname` LIBNAME=yac -LIBV=2.3.0 +LIBV=2.3.1 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/plugins/php/versions/71/imagemagick.sh b/plugins/php/versions/71/imagemagick.sh index fde729fad..7490287e6 100755 --- a/plugins/php/versions/71/imagemagick.sh +++ b/plugins/php/versions/71/imagemagick.sh @@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=imagick -LIBV=3.6.0 +LIBV=3.7.0 sysName=`uname` actionType=$1 version=$2 diff --git a/plugins/php/versions/71/yac.sh b/plugins/php/versions/71/yac.sh index 9107616af..b34f952b8 100755 --- a/plugins/php/versions/71/yac.sh +++ b/plugins/php/versions/71/yac.sh @@ -16,7 +16,7 @@ actionType=$1 version=$2 LIBNAME=yac -LIBV=2.3.0 +LIBV=2.3.1 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/plugins/php/versions/72/imagemagick.sh b/plugins/php/versions/72/imagemagick.sh index fde729fad..7490287e6 100755 --- a/plugins/php/versions/72/imagemagick.sh +++ b/plugins/php/versions/72/imagemagick.sh @@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=imagick -LIBV=3.6.0 +LIBV=3.7.0 sysName=`uname` actionType=$1 version=$2 diff --git a/plugins/php/versions/72/yac.sh b/plugins/php/versions/72/yac.sh index b97b6c742..995a4f9a1 100755 --- a/plugins/php/versions/72/yac.sh +++ b/plugins/php/versions/72/yac.sh @@ -15,7 +15,7 @@ actionType=$1 version=$2 LIBNAME=yac -LIBV=2.3.0 +LIBV=2.3.1 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/plugins/php/versions/73/imagemagick.sh b/plugins/php/versions/73/imagemagick.sh index fde729fad..7490287e6 100755 --- a/plugins/php/versions/73/imagemagick.sh +++ b/plugins/php/versions/73/imagemagick.sh @@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=imagick -LIBV=3.6.0 +LIBV=3.7.0 sysName=`uname` actionType=$1 version=$2 diff --git a/plugins/php/versions/73/yac.sh b/plugins/php/versions/73/yac.sh index b97b6c742..995a4f9a1 100755 --- a/plugins/php/versions/73/yac.sh +++ b/plugins/php/versions/73/yac.sh @@ -15,7 +15,7 @@ actionType=$1 version=$2 LIBNAME=yac -LIBV=2.3.0 +LIBV=2.3.1 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/plugins/php/versions/74/imagemagick.sh b/plugins/php/versions/74/imagemagick.sh index fde729fad..7490287e6 100755 --- a/plugins/php/versions/74/imagemagick.sh +++ b/plugins/php/versions/74/imagemagick.sh @@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=imagick -LIBV=3.6.0 +LIBV=3.7.0 sysName=`uname` actionType=$1 version=$2 diff --git a/plugins/php/versions/74/yac.sh b/plugins/php/versions/74/yac.sh index b97b6c742..995a4f9a1 100755 --- a/plugins/php/versions/74/yac.sh +++ b/plugins/php/versions/74/yac.sh @@ -15,7 +15,7 @@ actionType=$1 version=$2 LIBNAME=yac -LIBV=2.3.0 +LIBV=2.3.1 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/plugins/php/versions/80/imagemagick.sh b/plugins/php/versions/80/imagemagick.sh index fde729fad..7490287e6 100755 --- a/plugins/php/versions/80/imagemagick.sh +++ b/plugins/php/versions/80/imagemagick.sh @@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=imagick -LIBV=3.6.0 +LIBV=3.7.0 sysName=`uname` actionType=$1 version=$2 diff --git a/plugins/php/versions/80/yac.sh b/plugins/php/versions/80/yac.sh index b97b6c742..995a4f9a1 100755 --- a/plugins/php/versions/80/yac.sh +++ b/plugins/php/versions/80/yac.sh @@ -15,7 +15,7 @@ actionType=$1 version=$2 LIBNAME=yac -LIBV=2.3.0 +LIBV=2.3.1 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/plugins/php/versions/81/imagemagick.sh b/plugins/php/versions/81/imagemagick.sh index fde729fad..7490287e6 100755 --- a/plugins/php/versions/81/imagemagick.sh +++ b/plugins/php/versions/81/imagemagick.sh @@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=imagick -LIBV=3.6.0 +LIBV=3.7.0 sysName=`uname` actionType=$1 version=$2 diff --git a/plugins/php/versions/81/memcached.sh b/plugins/php/versions/81/memcached.sh index 63bfc33ac..80a9d8426 100755 --- a/plugins/php/versions/81/memcached.sh +++ b/plugins/php/versions/81/memcached.sh @@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=memcached -LIBV=3.1.5 +LIBV=3.2.0 sysName=`uname` actionType=$1 version=$2 diff --git a/plugins/php/versions/81/yac.sh b/plugins/php/versions/81/yac.sh index b97b6c742..995a4f9a1 100755 --- a/plugins/php/versions/81/yac.sh +++ b/plugins/php/versions/81/yac.sh @@ -15,7 +15,7 @@ actionType=$1 version=$2 LIBNAME=yac -LIBV=2.3.0 +LIBV=2.3.1 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/scripts/lib.sh b/scripts/lib.sh index 3c49e986f..7a550eb10 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -283,7 +283,9 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y libpcre3 libpcre3-dev apt install -y openssl - apt install -y imagemagick + apt install -y libmemcached-dev + #apt install -y imagemagick libmagickwand-dev + # apt install -y php-imagick php-imagick-all-dev apt install -y libxml2 libxml2-dev libbz2-dev libmcrypt-dev libpspell-dev librecode-dev apt install -y libgmp-dev libgmp3-dev libreadline-dev libxpm-dev From 740035e8aa6a6cf410b30fb997e4b830efefb65a Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 01:30:12 +0800 Subject: [PATCH 017/263] Update lib.sh --- scripts/lib.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/lib.sh b/scripts/lib.sh index 7a550eb10..6a4ef9140 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -284,8 +284,7 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y libpcre3 libpcre3-dev apt install -y openssl apt install -y libmemcached-dev - #apt install -y imagemagick libmagickwand-dev - # apt install -y php-imagick php-imagick-all-dev + apt install -y imagemagick libmagickwand-dev apt install -y libxml2 libxml2-dev libbz2-dev libmcrypt-dev libpspell-dev librecode-dev apt install -y libgmp-dev libgmp3-dev libreadline-dev libxpm-dev From afda85b23dbcb79467a311c98f00131c2a19b2ef Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 01:32:04 +0800 Subject: [PATCH 018/263] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 706e50d8e..193e8ef94 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ flask==2.0.3 flask-session==0.3.2 flask-helper==0.19 cache==1.0.3 -gevent==21.1.2 +gevent==21.12.0 gevent-websocket==0.10.1 psutil==5.9.1 chardet==3.0.4 From e03817853db5a85ec09c757f1b052fc9d16f03a2 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 01:33:05 +0800 Subject: [PATCH 019/263] Update lib.sh --- scripts/lib.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/lib.sh b/scripts/lib.sh index 6a4ef9140..f4ee7c559 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -351,7 +351,6 @@ pip install --upgrade pip 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-websocket==0.10.1 pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 @@ -376,7 +375,6 @@ pip install --upgrade pip pip3 install --upgrade setuptools pip3 install -r /www/server/mdserver-web/requirements.txt -pip3 install gunicorn==20.1.0 pip3 install gevent-websocket==0.10.1 pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 From 7daeaae995348becc4643a9d3bfe74c35cf4b7ef Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 01:40:02 +0800 Subject: [PATCH 020/263] up --- scripts/install/ubuntu.sh | 19 +++++++++++++++++++ scripts/lib.sh | 12 ++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 0e143a4cf..8defa90b2 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -64,6 +64,25 @@ cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data +VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` + + +if [ "${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 +else + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate +fi + +if [ "${VERSION_ID}" == "22.04" ];then + pip3 install -U --force-reinstall --no-binary :all: gevent +fi + + cd /www/server/mdserver-web && ./cli.sh start isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` diff --git a/scripts/lib.sh b/scripts/lib.sh index f4ee7c559..32a89a3ba 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -360,9 +360,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 +# 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 . @@ -384,9 +384,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 +# if [ "${OSNAME}" == "ubuntu" ] && [ "${VERSION_ID}" == "22.04" ];then +# pip3 install -U --force-reinstall --no-binary :all: gevent +# fi ##### common start ##### From e2e5dc0420a1bc208316e220541d4dc386ab5eec Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 01:46:58 +0800 Subject: [PATCH 021/263] Update xhprof.sh --- plugins/php/versions/70/xhprof.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/php/versions/70/xhprof.sh b/plugins/php/versions/70/xhprof.sh index 759081253..78654123f 100755 --- a/plugins/php/versions/70/xhprof.sh +++ b/plugins/php/versions/70/xhprof.sh @@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=xhprof -LIBV=2.3.5 +LIBV=2.1.2 sysName=`uname` actionType=$1 version=$2 From 6d2196222d09b8dca12a429de185f791726dc23a Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 01:49:37 +0800 Subject: [PATCH 022/263] Update yaf.sh --- plugins/php/versions/70/yaf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/php/versions/70/yaf.sh b/plugins/php/versions/70/yaf.sh index 0b3a89485..94543b9cc 100755 --- a/plugins/php/versions/70/yaf.sh +++ b/plugins/php/versions/70/yaf.sh @@ -18,7 +18,7 @@ version=$2 sysName=`uname` LIBNAME=yaf -LIBV=3.3.5 +LIBV=3.2.2 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so From 1c3176e905beb25d998f4bf761568381708b12b2 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 01:51:35 +0800 Subject: [PATCH 023/263] Update lib.sh --- scripts/lib.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/lib.sh b/scripts/lib.sh index 32a89a3ba..6e1e48f5e 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -295,6 +295,7 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y libjpeg62-turbo-dev apt install -y libfreetype6-dev apt install -y libevent-dev libncurses5-dev libldap2-dev + apt install -y libzip-dev apt install -y libicu-dev From fb11d318440d8c56329fc70cbabbe608f4c931f9 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 02:01:02 +0800 Subject: [PATCH 024/263] ip --- plugins/php/versions/71/intl.sh | 5 ++++- plugins/php/versions/72/intl.sh | 5 ++++- plugins/php/versions/73/intl.sh | 5 ++++- plugins/php/versions/74/intl.sh | 5 ++++- plugins/php/versions/80/intl.sh | 5 ++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/plugins/php/versions/71/intl.sh b/plugins/php/versions/71/intl.sh index c58d8741c..a0374a4f0 100755 --- a/plugins/php/versions/71/intl.sh +++ b/plugins/php/versions/71/intl.sh @@ -42,10 +42,13 @@ Install_lib() cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} fi + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh + cd $sourcePath/php${version}/ext/${LIBNAME} $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-icu-dir=${serverPath}/lib/icu make && make install && make clean diff --git a/plugins/php/versions/72/intl.sh b/plugins/php/versions/72/intl.sh index c58d8741c..a0374a4f0 100755 --- a/plugins/php/versions/72/intl.sh +++ b/plugins/php/versions/72/intl.sh @@ -42,10 +42,13 @@ Install_lib() cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} fi + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh + cd $sourcePath/php${version}/ext/${LIBNAME} $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-icu-dir=${serverPath}/lib/icu make && make install && make clean diff --git a/plugins/php/versions/73/intl.sh b/plugins/php/versions/73/intl.sh index c58d8741c..a0374a4f0 100755 --- a/plugins/php/versions/73/intl.sh +++ b/plugins/php/versions/73/intl.sh @@ -42,10 +42,13 @@ Install_lib() cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} fi + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh + cd $sourcePath/php${version}/ext/${LIBNAME} $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-icu-dir=${serverPath}/lib/icu make && make install && make clean diff --git a/plugins/php/versions/74/intl.sh b/plugins/php/versions/74/intl.sh index c58d8741c..a0374a4f0 100755 --- a/plugins/php/versions/74/intl.sh +++ b/plugins/php/versions/74/intl.sh @@ -42,10 +42,13 @@ Install_lib() cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} fi + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh + cd $sourcePath/php${version}/ext/${LIBNAME} $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-icu-dir=${serverPath}/lib/icu make && make install && make clean diff --git a/plugins/php/versions/80/intl.sh b/plugins/php/versions/80/intl.sh index c58d8741c..a0374a4f0 100755 --- a/plugins/php/versions/80/intl.sh +++ b/plugins/php/versions/80/intl.sh @@ -42,10 +42,13 @@ Install_lib() cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} fi + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh + cd $sourcePath/php${version}/ext/${LIBNAME} $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-icu-dir=${serverPath}/lib/icu make && make install && make clean From cf0b00891e1346f519badb31b26308f3f6fa7184 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 02:37:57 +0800 Subject: [PATCH 025/263] openssl --- plugins/php/lib/openssl.sh | 26 ++++++++ plugins/php/versions/52/openssl.sh | 103 +++++++++++++++++++++++++++++ plugins/php/versions/53/openssl.sh | 103 +++++++++++++++++++++++++++++ plugins/php/versions/54/openssl.sh | 103 +++++++++++++++++++++++++++++ plugins/php/versions/55/openssl.sh | 103 +++++++++++++++++++++++++++++ plugins/php/versions/56/openssl.sh | 14 +++- plugins/php/versions/70/openssl.sh | 103 +++++++++++++++++++++++++++++ plugins/php/versions/71/openssl.sh | 5 +- plugins/php/versions/72/openssl.sh | 5 +- plugins/php/versions/73/openssl.sh | 5 +- plugins/php/versions/74/openssl.sh | 5 +- plugins/php/versions/80/openssl.sh | 5 +- plugins/php/versions/phplib.conf | 3 + 13 files changed, 577 insertions(+), 6 deletions(-) create mode 100644 plugins/php/lib/openssl.sh create mode 100755 plugins/php/versions/52/openssl.sh create mode 100755 plugins/php/versions/53/openssl.sh create mode 100755 plugins/php/versions/54/openssl.sh create mode 100755 plugins/php/versions/55/openssl.sh create mode 100755 plugins/php/versions/70/openssl.sh diff --git a/plugins/php/lib/openssl.sh b/plugins/php/lib/openssl.sh new file mode 100644 index 000000000..f3f834a3d --- /dev/null +++ b/plugins/php/lib/openssl.sh @@ -0,0 +1,26 @@ +#!/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") + +# echo $rootPath + +SERVER_ROOT=$rootPath/lib +SOURCE_ROOT=$rootPath/source/lib + +if [ ! -d ${SERVER_ROOT}/openssl ];then + cd ${SOURCE_ROOT} + if [ ! -f ${SOURCE_ROOT}/openssl-1.0.2q.tar.gz ];then + wget https://github.com/midoks/mdserver-web/releases/download/init/openssl-1.0.2q.tar.gz -T 20 + fi + tar -zxf openssl-1.0.2q.tar.gz + cd openssl-1.0.2q + ./config --openssldir=${SERVER_ROOT}/openssl zlib-dynamic shared + make && make install +fi + diff --git a/plugins/php/versions/52/openssl.sh b/plugins/php/versions/52/openssl.sh new file mode 100755 index 000000000..29a8478a8 --- /dev/null +++ b/plugins/php/versions/52/openssl.sh @@ -0,0 +1,103 @@ +#!/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 + +actionType=$1 +version=$2 + +LIBNAME=openssl +LIBV=0 + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so + +sysName=`uname` +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 + + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + + if [ ! -f "$extFile" ];then + + if [ ! -d $sourcePath/php${version}/ext ];then + cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} + fi + + cd $sourcePath/php${version}/ext/${LIBNAME} + + if [ ! -f "config.m4" ];then + mv config0.m4 config.m4 + fi + + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-openssl=${serverPath}/lib/openssl + make clean && make && make install && make clean + + 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},请选择其它版本!" + return + fi + + echo $serverPath/php/$version/etc/php.ini + 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/openssl.sh b/plugins/php/versions/53/openssl.sh new file mode 100755 index 000000000..29a8478a8 --- /dev/null +++ b/plugins/php/versions/53/openssl.sh @@ -0,0 +1,103 @@ +#!/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 + +actionType=$1 +version=$2 + +LIBNAME=openssl +LIBV=0 + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so + +sysName=`uname` +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 + + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + + if [ ! -f "$extFile" ];then + + if [ ! -d $sourcePath/php${version}/ext ];then + cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} + fi + + cd $sourcePath/php${version}/ext/${LIBNAME} + + if [ ! -f "config.m4" ];then + mv config0.m4 config.m4 + fi + + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-openssl=${serverPath}/lib/openssl + make clean && make && make install && make clean + + 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},请选择其它版本!" + return + fi + + echo $serverPath/php/$version/etc/php.ini + 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/openssl.sh b/plugins/php/versions/54/openssl.sh new file mode 100755 index 000000000..29a8478a8 --- /dev/null +++ b/plugins/php/versions/54/openssl.sh @@ -0,0 +1,103 @@ +#!/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 + +actionType=$1 +version=$2 + +LIBNAME=openssl +LIBV=0 + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so + +sysName=`uname` +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 + + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + + if [ ! -f "$extFile" ];then + + if [ ! -d $sourcePath/php${version}/ext ];then + cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} + fi + + cd $sourcePath/php${version}/ext/${LIBNAME} + + if [ ! -f "config.m4" ];then + mv config0.m4 config.m4 + fi + + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-openssl=${serverPath}/lib/openssl + make clean && make && make install && make clean + + 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},请选择其它版本!" + return + fi + + echo $serverPath/php/$version/etc/php.ini + 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/openssl.sh b/plugins/php/versions/55/openssl.sh new file mode 100755 index 000000000..29a8478a8 --- /dev/null +++ b/plugins/php/versions/55/openssl.sh @@ -0,0 +1,103 @@ +#!/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 + +actionType=$1 +version=$2 + +LIBNAME=openssl +LIBV=0 + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so + +sysName=`uname` +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 + + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + + if [ ! -f "$extFile" ];then + + if [ ! -d $sourcePath/php${version}/ext ];then + cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} + fi + + cd $sourcePath/php${version}/ext/${LIBNAME} + + if [ ! -f "config.m4" ];then + mv config0.m4 config.m4 + fi + + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-openssl=${serverPath}/lib/openssl + make clean && make && make install && make clean + + 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},请选择其它版本!" + return + fi + + echo $serverPath/php/$version/etc/php.ini + 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/openssl.sh b/plugins/php/versions/56/openssl.sh index d93233b72..29a8478a8 100755 --- a/plugins/php/versions/56/openssl.sh +++ b/plugins/php/versions/56/openssl.sh @@ -36,8 +36,14 @@ Install_lib() return fi + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + if [ ! -f "$extFile" ];then + if [ ! -d $sourcePath/php${version}/ext ];then + cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} + fi + cd $sourcePath/php${version}/ext/${LIBNAME} if [ ! -f "config.m4" ];then @@ -45,11 +51,17 @@ Install_lib() fi $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-openssl=${serverPath}/lib/openssl make clean && make && make install && make clean 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 diff --git a/plugins/php/versions/70/openssl.sh b/plugins/php/versions/70/openssl.sh new file mode 100755 index 000000000..29a8478a8 --- /dev/null +++ b/plugins/php/versions/70/openssl.sh @@ -0,0 +1,103 @@ +#!/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 + +actionType=$1 +version=$2 + +LIBNAME=openssl +LIBV=0 + +NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` +extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so + +sysName=`uname` +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 + + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + + if [ ! -f "$extFile" ];then + + if [ ! -d $sourcePath/php${version}/ext ];then + cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} + fi + + cd $sourcePath/php${version}/ext/${LIBNAME} + + if [ ! -f "config.m4" ];then + mv config0.m4 config.m4 + fi + + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-openssl=${serverPath}/lib/openssl + make clean && make && make install && make clean + + 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},请选择其它版本!" + return + fi + + echo $serverPath/php/$version/etc/php.ini + 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/openssl.sh b/plugins/php/versions/71/openssl.sh index 165e01bd2..29a8478a8 100755 --- a/plugins/php/versions/71/openssl.sh +++ b/plugins/php/versions/71/openssl.sh @@ -36,6 +36,8 @@ Install_lib() return fi + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + if [ ! -f "$extFile" ];then if [ ! -d $sourcePath/php${version}/ext ];then @@ -49,7 +51,8 @@ Install_lib() fi $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-openssl=${serverPath}/lib/openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/72/openssl.sh b/plugins/php/versions/72/openssl.sh index 165e01bd2..29a8478a8 100755 --- a/plugins/php/versions/72/openssl.sh +++ b/plugins/php/versions/72/openssl.sh @@ -36,6 +36,8 @@ Install_lib() return fi + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + if [ ! -f "$extFile" ];then if [ ! -d $sourcePath/php${version}/ext ];then @@ -49,7 +51,8 @@ Install_lib() fi $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-openssl=${serverPath}/lib/openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/73/openssl.sh b/plugins/php/versions/73/openssl.sh index 165e01bd2..29a8478a8 100755 --- a/plugins/php/versions/73/openssl.sh +++ b/plugins/php/versions/73/openssl.sh @@ -36,6 +36,8 @@ Install_lib() return fi + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + if [ ! -f "$extFile" ];then if [ ! -d $sourcePath/php${version}/ext ];then @@ -49,7 +51,8 @@ Install_lib() fi $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-openssl=${serverPath}/lib/openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/74/openssl.sh b/plugins/php/versions/74/openssl.sh index 165e01bd2..29a8478a8 100755 --- a/plugins/php/versions/74/openssl.sh +++ b/plugins/php/versions/74/openssl.sh @@ -36,6 +36,8 @@ Install_lib() return fi + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + if [ ! -f "$extFile" ];then if [ ! -d $sourcePath/php${version}/ext ];then @@ -49,7 +51,8 @@ Install_lib() fi $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-openssl=${serverPath}/lib/openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/80/openssl.sh b/plugins/php/versions/80/openssl.sh index 165e01bd2..29a8478a8 100755 --- a/plugins/php/versions/80/openssl.sh +++ b/plugins/php/versions/80/openssl.sh @@ -36,6 +36,8 @@ Install_lib() return fi + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + if [ ! -f "$extFile" ];then if [ ! -d $sourcePath/php${version}/ext ];then @@ -49,7 +51,8 @@ Install_lib() fi $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-openssl=${serverPath}/lib/openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/phplib.conf b/plugins/php/versions/phplib.conf index 4fd4f3050..d1c903c96 100755 --- a/plugins/php/versions/phplib.conf +++ b/plugins/php/versions/phplib.conf @@ -63,6 +63,9 @@ { "name": "openssl", "versions": [ + "53", + "54", + "55", "56", "71", "72", From 28305c62ba665198ce9c45ccd00111ca4cd04d49 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 02:49:45 +0800 Subject: [PATCH 026/263] up --- plugins/php/versions/53/xdebug.sh | 2 +- plugins/php/versions/54/xdebug.sh | 2 +- plugins/php/versions/55/xdebug.sh | 2 +- plugins/php/versions/56/xdebug.sh | 2 +- plugins/php/versions/70/xdebug.sh | 2 +- plugins/php/versions/71/xdebug.sh | 2 +- plugins/php/versions/72/xdebug.sh | 2 +- plugins/php/versions/73/xdebug.sh | 2 +- plugins/php/versions/74/xdebug.sh | 2 +- plugins/php/versions/80/xdebug.sh | 2 +- plugins/php/versions/81/xdebug.sh | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/php/versions/53/xdebug.sh b/plugins/php/versions/53/xdebug.sh index aa1ae0d1c..349dfe1c8 100755 --- a/plugins/php/versions/53/xdebug.sh +++ b/plugins/php/versions/53/xdebug.sh @@ -60,7 +60,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 '===========================================================' diff --git a/plugins/php/versions/54/xdebug.sh b/plugins/php/versions/54/xdebug.sh index 7aaf482e3..79bf20805 100755 --- a/plugins/php/versions/54/xdebug.sh +++ b/plugins/php/versions/54/xdebug.sh @@ -57,7 +57,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 '===========================================================' diff --git a/plugins/php/versions/55/xdebug.sh b/plugins/php/versions/55/xdebug.sh index b57ee4885..decf2180b 100755 --- a/plugins/php/versions/55/xdebug.sh +++ b/plugins/php/versions/55/xdebug.sh @@ -61,7 +61,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 '===========================================================' diff --git a/plugins/php/versions/56/xdebug.sh b/plugins/php/versions/56/xdebug.sh index 5a1c06c54..bdac443aa 100755 --- a/plugins/php/versions/56/xdebug.sh +++ b/plugins/php/versions/56/xdebug.sh @@ -59,7 +59,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 '===========================================================' diff --git a/plugins/php/versions/70/xdebug.sh b/plugins/php/versions/70/xdebug.sh index 98de7fdcf..e55391fed 100755 --- a/plugins/php/versions/70/xdebug.sh +++ b/plugins/php/versions/70/xdebug.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 '===========================================================' diff --git a/plugins/php/versions/71/xdebug.sh b/plugins/php/versions/71/xdebug.sh index 0c9fa0c18..8fbb08afd 100755 --- a/plugins/php/versions/71/xdebug.sh +++ b/plugins/php/versions/71/xdebug.sh @@ -57,7 +57,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 '===========================================================' diff --git a/plugins/php/versions/72/xdebug.sh b/plugins/php/versions/72/xdebug.sh index c08c3dfa9..97ecfdb86 100755 --- a/plugins/php/versions/72/xdebug.sh +++ b/plugins/php/versions/72/xdebug.sh @@ -56,7 +56,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 '===========================================================' diff --git a/plugins/php/versions/73/xdebug.sh b/plugins/php/versions/73/xdebug.sh index a28100421..e610af9f6 100755 --- a/plugins/php/versions/73/xdebug.sh +++ b/plugins/php/versions/73/xdebug.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 '===========================================================' diff --git a/plugins/php/versions/74/xdebug.sh b/plugins/php/versions/74/xdebug.sh index bb2aac870..b8d00c3a0 100755 --- a/plugins/php/versions/74/xdebug.sh +++ b/plugins/php/versions/74/xdebug.sh @@ -60,7 +60,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 '===========================================================' diff --git a/plugins/php/versions/80/xdebug.sh b/plugins/php/versions/80/xdebug.sh index 8c31817f5..661f2dcca 100755 --- a/plugins/php/versions/80/xdebug.sh +++ b/plugins/php/versions/80/xdebug.sh @@ -59,7 +59,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 '===========================================================' diff --git a/plugins/php/versions/81/xdebug.sh b/plugins/php/versions/81/xdebug.sh index 8c31817f5..661f2dcca 100755 --- a/plugins/php/versions/81/xdebug.sh +++ b/plugins/php/versions/81/xdebug.sh @@ -59,7 +59,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 892ba9e85d88d9ed75eff618f2b6f3df22d6833b Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 03:14:07 +0800 Subject: [PATCH 027/263] up --- plugins/php/versions/74/openssl.sh | 2 +- plugins/php/versions/80/openssl.sh | 2 +- scripts/lib.sh | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/php/versions/74/openssl.sh b/plugins/php/versions/74/openssl.sh index 29a8478a8..b78529e26 100755 --- a/plugins/php/versions/74/openssl.sh +++ b/plugins/php/versions/74/openssl.sh @@ -52,7 +52,7 @@ Install_lib() $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl=${serverPath}/lib/openssl + --with-openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/80/openssl.sh b/plugins/php/versions/80/openssl.sh index 29a8478a8..b78529e26 100755 --- a/plugins/php/versions/80/openssl.sh +++ b/plugins/php/versions/80/openssl.sh @@ -52,7 +52,7 @@ Install_lib() $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl=${serverPath}/lib/openssl + --with-openssl make clean && make && make install && make clean fi diff --git a/scripts/lib.sh b/scripts/lib.sh index 6e1e48f5e..0e2718cc0 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -272,6 +272,7 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y devscripts apt install -y net-tools apt install -y python3-dev + apt install -y autoconf apt install -y libffi-dev apt install -y cmake automake make @@ -283,7 +284,10 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y libpcre3 libpcre3-dev apt install -y openssl + apt install -y libssl-dev + apt install -y libcurl4-openssl-dev apt install -y libmemcached-dev + apt install -y libsasl2-dev apt install -y imagemagick libmagickwand-dev apt install -y libxml2 libxml2-dev libbz2-dev libmcrypt-dev libpspell-dev librecode-dev @@ -299,7 +303,7 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y libicu-dev - apt install -y gcc build-essential libssl-dev + apt install -y gcc build-essential apt install -y curl libcurl4-gnutls-dev #https://blog.csdn.net/qq_36228377/article/details/123154344 From 287134c15b02d3e987e0b263889fc219b74a760e Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 09:23:15 +0800 Subject: [PATCH 028/263] Update site_api.py --- class/core/site_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index 1f8c7a7f5..06506905c 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -287,7 +287,7 @@ class site_api: domains.append(tmp) data['domains'] = domains data['email'] = mw.M('users').getField('email') - if data['email'] == '287962566@qq.com': + if data['email'] == 'midoks@163.com': data['email'] = '' return mw.returnJson(True, 'OK', data) From 175846a5a84bc80206ba594688b30e9fb6be2dad Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 09:56:57 +0800 Subject: [PATCH 029/263] up --- plugins/php/versions/74/openssl.sh | 1 + plugins/php/versions/80/openssl.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/php/versions/74/openssl.sh b/plugins/php/versions/74/openssl.sh index b78529e26..cd893ed36 100755 --- a/plugins/php/versions/74/openssl.sh +++ b/plugins/php/versions/74/openssl.sh @@ -50,6 +50,7 @@ Install_lib() mv config0.m4 config.m4 fi + export PKG_CONFIG_PATH=/www/server/lib/openssl/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ --with-openssl diff --git a/plugins/php/versions/80/openssl.sh b/plugins/php/versions/80/openssl.sh index b78529e26..cd893ed36 100755 --- a/plugins/php/versions/80/openssl.sh +++ b/plugins/php/versions/80/openssl.sh @@ -50,6 +50,7 @@ Install_lib() mv config0.m4 config.m4 fi + export PKG_CONFIG_PATH=/www/server/lib/openssl/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ --with-openssl From d51ffca6976150bf7df2fd758a2b54d5d914226e Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 10:37:54 +0800 Subject: [PATCH 030/263] =?UTF-8?q?php=E6=89=A9=E5=B1=95=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/config_api.py | 2 +- plugins/php/all_test.sh | 31 ++++++++++++++++--------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/class/core/config_api.py b/class/core/config_api.py index 71f991acc..6bca6fc85 100755 --- a/class/core/config_api.py +++ b/class/core/config_api.py @@ -18,7 +18,7 @@ class config_api: # 本版解决自启动问题 # 文件管理重命名 # 优化计划任务管理 - __version = '0.8.6.1' + __version = '0.8.6.2' def __init__(self): pass diff --git a/plugins/php/all_test.sh b/plugins/php/all_test.sh index b1320db99..0b4122dcf 100644 --- a/plugins/php/all_test.sh +++ b/plugins/php/all_test.sh @@ -5,25 +5,26 @@ DIR=$(cd "$(dirname "$0")"; pwd) # cd /www/server/mdserver-web/plugins/php && bash all_test.sh -# cd /www/server/mdserver-web/plugins/php/versions/71/ && bash openssl.sh install 71 +# cd /www/server/mdserver-web/plugins/php/versions/74/ && bash openssl.sh install 74 # cd /www/server/mdserver-web/plugins/php/versions/81/ && bash imagemagick.sh install 81 +# cd /www/server/mdserver-web/plugins/php/versions/70/ && bash imagemagick.sh install 70 -PHP_VER=53 -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=52 +# 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_LIST=(54 55 56 70 71 72 73 74 80 81) +PHP_VER_LIST=(53 54 55 56 70 71 72 73 74 80 81) # PHP_VER_LIST=(81) for PHP_VER in ${PHP_VER_LIST[@]}; do echo "php${PHP_VER} -- start" From 64f7b9b50ad6171b8a93440257405be4cb53a963 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 12:04:29 +0800 Subject: [PATCH 031/263] =?UTF-8?q?=20=E5=88=9B=E5=BB=BA=E7=AB=99=E7=82=B9?= =?UTF-8?q?=E6=A3=80=E6=9F=A5web=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/plugins_api.py | 2 +- class/core/site_api.py | 21 ++++++++++++++++++++- route/static/app/site.js | 15 +++++++++++++++ route/static/app/soft.js | 11 ----------- route/static/img/apache.png | Bin 1400 -> 0 bytes route/static/img/mysql.png | Bin 388 -> 0 bytes route/static/img/nginx.png | Bin 375 -> 0 bytes route/static/img/php.png | Bin 801 -> 0 bytes 8 files changed, 36 insertions(+), 13 deletions(-) delete mode 100755 route/static/img/apache.png delete mode 100755 route/static/img/mysql.png delete mode 100755 route/static/img/nginx.png delete mode 100755 route/static/img/php.png diff --git a/class/core/plugins_api.py b/class/core/plugins_api.py index eb99e2124..77ac43824 100755 --- a/class/core/plugins_api.py +++ b/class/core/plugins_api.py @@ -794,7 +794,7 @@ class plugins_api: return mw.returnJson(True, '删除成功!') # shell 调用 - def run(self, name, func, version, args='', script='index'): + def run(self, name, func, version='', args='', script='index'): path = mw.getRunDir() + '/' + self.__plugin_dir + \ '/' + name + '/' + script + '.py' py = 'python3 ' + path diff --git a/class/core/site_api.py b/class/core/site_api.py index 06506905c..aa2a78889 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -823,6 +823,25 @@ class site_api: port = request.form.get('port', '') return self.add(webname, port, ps, path, version) + def checkWebStatusApi(self): + ''' + 创建站点检查web服务 + ''' + if not mw.isInstalledWeb(): + return mw.returnJson(False, '请安装并启动OpenResty服务!') + + path = mw.getServerDir() + '/openresty/init.d/openresty' + data = mw.execShell(path + " status") + if data[0].strip().find('stopped') != -1: + return mw.returnJson(False, '请启动OpenResty服务!') + + # import plugins_api + # data = plugins_api.plugins_api().run('openresty', 'status') + # if data[0].strip() == 'stop': + # return mw.returnJson(False, '请启动OpenResty服务!') + + return mw.returnJson(True, 'OK') + def addDomainApi(self): isError = mw.checkWebConfig() if isError != True: @@ -1075,7 +1094,7 @@ class site_api: # self.closeHasPwd(get) filename = self.passPath + '/' + siteName + '.pass' - print(filename) + # print(filename) passconf = username + ':' + mw.hasPwd(password) if siteName == 'phpmyadmin': diff --git a/route/static/app/site.js b/route/static/app/site.js index 02e7866b8..fe9b437f4 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -163,8 +163,23 @@ function setWebPs(b, e, a) { },'json'); } +function checkWebStatus(){ + data = syncPost('/site/check_web_status') + if (data.status){ + return true + } + layer.msg(data.msg,{icon:0,time:3000,shade: [0.3, "#000"]}) + return false +} + //添加站点 function webAdd(type) { + checkPass = checkWebStatus() + //未开启openresty,不能继续 + if (!checkPass){ + return + } + if (type == 1) { var array; var str=""; diff --git a/route/static/app/soft.js b/route/static/app/soft.js index 94bca7e5e..8f59f2a80 100755 --- a/route/static/app/soft.js +++ b/route/static/app/soft.js @@ -146,17 +146,6 @@ function getSList(isdisplay) { '' + indexshow + '' + '' + handle + '' + ''; - - // sBody += '' + - // '' + plugin_title + '' + - // '' + plugin.ps + '' + - // '' + softPath + '' + - // '' + state + '' + - // '' + indexshow + '' + - // '' + handle + '' + - // ''; } sBody += pBody; diff --git a/route/static/img/apache.png b/route/static/img/apache.png deleted file mode 100755 index e321bcae0f90bab21f58152d6e96c1b14f77247e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1400 zcmV-;1&8{HP)~j=XNimF81^3aSKkHCp;XSl#WB=hqWEa*NbUDG!waW>x zZ3CYd*pQ#9(Bj!Q5?7M=c($;H#N&!-pf>e!B}3k^CAhsOrHAIB5S&S%g^KVO2dN`} z(CP1YCi=8BZT+?*`JFD0aNB2pqIob}wGt>Q z%CFNzWDIC=ob1h8yo|x!6kwYkxRU6Vj(i0eX`%>tUJpTFup5g{qVF8JxaThVI6JS*|jxI>*7Q> zR1#H9?fE6`NF-IbrI-L(dfozm#d9wUj%qc`jgtzZlBg)JNwgL?$JDvlPEMW~EWY(| z!R@@Ft^kMISJN}+o{m-vHocuq%bvagI0|tlfL5aWux=|l-%p#*u7E9>O`kGwB^KlH2%Wsf>ZVCNhN{9ZGJ87 zS-D0kX9DPOTNQ9Av8n>2lC^2dX;;!i6;1^bIH@Swj;ZFMz;1+*Dg}`@S4+`i(N(tDu)&W_hs3$1WPenp2Of^>*2jo za3+BM!Ux}>1+gmxu&Y=dN-tgmun338QCSR5&R%zqsh|AL!cYHDXdwW=?JVAeelB|@ zst0IPIkZ2Ko}$9G8UZfuH{PFC>n2nWEfw5f6)we4;4!p1!tns<@VA{QpgYBVNzEzS zP;k0bQ<@yB1ssr3YZX7f(C-uBOaWc~(qKlJwm<ZXME9bc)zo6p`o#6gf;_*>ftt8jccsCa62&x#HQ>GxY5%90`gp} zp#V`uR1;N2`$L>@;FK@>bo;hqC;BtihJGsEi5ge9m>#qm3KnZ}XzNF4)u`#=x-$-R z)(u{O>H&x92@qhko7W{;JDiB(#(_MI7M}?MK2_0@k0;WnC*4AJ>{L__)f6PJO&tz} zap1CL%bYdAvS8BWNyKdySe@dRpo*xbp!o!5*rSZAJbx(rKr@CV43tx8)dpuGVF6vFn7 zBSz&8J{LtmG-o*H9!{KN?GG4l-m=l|QJQ z;)^dTtUrFEtSi38hXJrRR0zYhLin~~RQ{l?`XGQBz_6-&1^T}4aRo88aiZNELZ0Q@ zK7Xjo02>QGUu1t|pvBKyd|$4^`*;pR!g2N%#)OG>2IPN>%XbeU^LoDk0000gF$Eq{NGv6tt33k^-GrxK3LLJ2tStHe|8Jjc zJb7}$;=cUD-rTWG)#5)2S$bZ!DNpOkx_?lJv1j57>1@-zg-@ey{p|Zwxouvy#iXcz z_b0tt`SJlvLh7FUn71Z2{}tt({FZ!7dEFTDsqX5=`LeZQUlrPG+8%z8->WP8UG3$S zmeX@(7Oa(f{FA$VZcgo!-P2TeKT)yab}+7=wEe-G&5F8?CodEf>3_O(`pASVk$A@` zQx)EZ%$_B$w}=bYn_s4ZgQq+1E_?ftx7OOD z8G=Jl#Snabz9!=|nt*hNU^beFiUpxuGMbo0DOg?b+(B_MPGjPN{L}8>P*I#YxW&u` z9B6J;vD{4S?Un0ago1mNMo*b$(v^C9b&FeWco+w6 zbs&+8^kIN8u4flcf`@?*+_OgEyE zPq}j(`~9BZAFE&HdES%+NPw;+KmsH{0wh2JBtQaGy$|MF{cGC4{8XC&0*r;`@Aa@5 zpfhO`A-6vaio&g`d%FoB!0b5O%vOL512qhHOS<~;QT$h+Ws|z^AbX|P%M)|D>iuG9 z1gImR1dV{!;rH09z`K_ByeZzJfyx+=Gvpl6?5RUpUU`}R$M}io8mJ7#<1I8@)a$h! zJZ zY!`A=hF!QImx{X%`82+BW5^qm+rwxsN7wEu4k4AX&`8F+N=JDJI9kKzcos52rOkD$ ztIh?N+Tm|OsJQ&y)Bf#)j9*nV3O!ypDO_+GOUUA>11C+XO_%H?yImeSLdA*PWh7$B zW!v01`ZBdT0cLhRgr4l!G2?VJ=kel1XNc6X)9*Yn=k) zCaB9T*%j}(Dz&lejLVU)hokcHtqJ=FDWxD_&SE@(I=|$nI+pTzo=23Ljb{v(%cf((*nwq9r=m4(sRJ5C^mIH#bf9kG!9EC_Yao_&sBNAA_@HV}chYr`{v z5NN|w6{zl8cC3B~h`T-ag6GLO_R*icTw^lN2BPXnlAnSFNPq-LfCNZ@ f1W14cXfyf)&s-7#c$c%c00000NkvXXu0mjfF-U|# From e7bc0ba1fbd748de21abe9a4a7bd925557ef1639 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 12:31:34 +0800 Subject: [PATCH 032/263] Update site_api.py --- class/core/site_api.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index aa2a78889..5148eb66f 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -830,11 +830,16 @@ class site_api: if not mw.isInstalledWeb(): return mw.returnJson(False, '请安装并启动OpenResty服务!') - path = mw.getServerDir() + '/openresty/init.d/openresty' - data = mw.execShell(path + " status") - if data[0].strip().find('stopped') != -1: + # 这个快点 + pid = mw.getServerDir() + '/openresty/nginx/logs/nginx.pid' + if not os.path.exists(pid): return mw.returnJson(False, '请启动OpenResty服务!') + # path = mw.getServerDir() + '/openresty/init.d/openresty' + # data = mw.execShell(path + " status") + # if data[0].strip().find('stopped') != -1: + # return mw.returnJson(False, '请启动OpenResty服务!') + # import plugins_api # data = plugins_api.plugins_api().run('openresty', 'status') # if data[0].strip() == 'stop': From 9471134647cd44eb7d2acebcbcf4cac6c914a84a Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 13:15:33 +0800 Subject: [PATCH 033/263] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E7=9B=B8?= =?UTF-8?q?=E5=AF=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/versions/52/openssl.sh | 3 ++- plugins/php/versions/53/openssl.sh | 3 ++- plugins/php/versions/54/openssl.sh | 3 ++- plugins/php/versions/55/openssl.sh | 3 ++- plugins/php/versions/56/openssl.sh | 3 ++- plugins/php/versions/70/openssl.sh | 3 ++- plugins/php/versions/71/openssl.sh | 3 ++- plugins/php/versions/72/openssl.sh | 3 ++- plugins/php/versions/73/openssl.sh | 3 ++- plugins/php/versions/74/openssl.sh | 2 +- plugins/php/versions/80/openssl.sh | 2 +- 11 files changed, 20 insertions(+), 11 deletions(-) diff --git a/plugins/php/versions/52/openssl.sh b/plugins/php/versions/52/openssl.sh index 29a8478a8..17950eef8 100755 --- a/plugins/php/versions/52/openssl.sh +++ b/plugins/php/versions/52/openssl.sh @@ -50,9 +50,10 @@ Install_lib() mv config0.m4 config.m4 fi + export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl=${serverPath}/lib/openssl + --with-openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/53/openssl.sh b/plugins/php/versions/53/openssl.sh index 29a8478a8..17950eef8 100755 --- a/plugins/php/versions/53/openssl.sh +++ b/plugins/php/versions/53/openssl.sh @@ -50,9 +50,10 @@ Install_lib() mv config0.m4 config.m4 fi + export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl=${serverPath}/lib/openssl + --with-openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/54/openssl.sh b/plugins/php/versions/54/openssl.sh index 29a8478a8..17950eef8 100755 --- a/plugins/php/versions/54/openssl.sh +++ b/plugins/php/versions/54/openssl.sh @@ -50,9 +50,10 @@ Install_lib() mv config0.m4 config.m4 fi + export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl=${serverPath}/lib/openssl + --with-openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/55/openssl.sh b/plugins/php/versions/55/openssl.sh index 29a8478a8..17950eef8 100755 --- a/plugins/php/versions/55/openssl.sh +++ b/plugins/php/versions/55/openssl.sh @@ -50,9 +50,10 @@ Install_lib() mv config0.m4 config.m4 fi + export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl=${serverPath}/lib/openssl + --with-openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/56/openssl.sh b/plugins/php/versions/56/openssl.sh index 29a8478a8..17950eef8 100755 --- a/plugins/php/versions/56/openssl.sh +++ b/plugins/php/versions/56/openssl.sh @@ -50,9 +50,10 @@ Install_lib() mv config0.m4 config.m4 fi + export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl=${serverPath}/lib/openssl + --with-openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/70/openssl.sh b/plugins/php/versions/70/openssl.sh index 29a8478a8..17950eef8 100755 --- a/plugins/php/versions/70/openssl.sh +++ b/plugins/php/versions/70/openssl.sh @@ -50,9 +50,10 @@ Install_lib() mv config0.m4 config.m4 fi + export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl=${serverPath}/lib/openssl + --with-openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/71/openssl.sh b/plugins/php/versions/71/openssl.sh index 29a8478a8..17950eef8 100755 --- a/plugins/php/versions/71/openssl.sh +++ b/plugins/php/versions/71/openssl.sh @@ -50,9 +50,10 @@ Install_lib() mv config0.m4 config.m4 fi + export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl=${serverPath}/lib/openssl + --with-openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/72/openssl.sh b/plugins/php/versions/72/openssl.sh index 29a8478a8..17950eef8 100755 --- a/plugins/php/versions/72/openssl.sh +++ b/plugins/php/versions/72/openssl.sh @@ -50,9 +50,10 @@ Install_lib() mv config0.m4 config.m4 fi + export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl=${serverPath}/lib/openssl + --with-openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/73/openssl.sh b/plugins/php/versions/73/openssl.sh index 29a8478a8..17950eef8 100755 --- a/plugins/php/versions/73/openssl.sh +++ b/plugins/php/versions/73/openssl.sh @@ -50,9 +50,10 @@ Install_lib() mv config0.m4 config.m4 fi + export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl=${serverPath}/lib/openssl + --with-openssl make clean && make && make install && make clean fi diff --git a/plugins/php/versions/74/openssl.sh b/plugins/php/versions/74/openssl.sh index cd893ed36..17950eef8 100755 --- a/plugins/php/versions/74/openssl.sh +++ b/plugins/php/versions/74/openssl.sh @@ -50,7 +50,7 @@ Install_lib() mv config0.m4 config.m4 fi - export PKG_CONFIG_PATH=/www/server/lib/openssl/lib/pkgconfig + export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ --with-openssl diff --git a/plugins/php/versions/80/openssl.sh b/plugins/php/versions/80/openssl.sh index cd893ed36..17950eef8 100755 --- a/plugins/php/versions/80/openssl.sh +++ b/plugins/php/versions/80/openssl.sh @@ -50,7 +50,7 @@ Install_lib() mv config0.m4 config.m4 fi - export PKG_CONFIG_PATH=/www/server/lib/openssl/lib/pkgconfig + export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ --with-openssl From 4bd4d97eb7933ee983b9400cb7dfd10ae434bfd1 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 13:36:13 +0800 Subject: [PATCH 034/263] =?UTF-8?q?=E8=A7=A3=E5=86=B3openssl=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E9=97=AE=E9=A2=98=EF=BC=8Copenssl=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=A4=AA=E9=AB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mysql/versions/5.6/install.sh | 18 +++++++++++++++--- plugins/mysql/versions/5.7/install.sh | 11 +++++++++++ plugins/mysql/versions/8.0/install.sh | 10 ++++++++++ 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/plugins/mysql/versions/5.6/install.sh b/plugins/mysql/versions/5.6/install.sh index 790360d73..4d11114e9 100755 --- a/plugins/mysql/versions/5.6/install.sh +++ b/plugins/mysql/versions/5.6/install.sh @@ -44,7 +44,17 @@ Install_mysql() if [ ! -d ${mysqlDir}/mysql-5.6.50 ];then cd ${mysqlDir} && tar -zxvf ${mysqlDir}/mysql-5.6.50.tar.gz fi - + + + OPTIONS='' + ##check openssl version + OPENSSL_VERSION=`openssl version|awk '{print $2}'|awk -F '.' '{print $1}'` + if [ "${OPENSSL_VERSION}" -ge "3" ];then + #openssl version to high + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig + OPTIONS="-DWITH_SSL=${serverPath}/lib/openssl" + fi if [ ! -d $serverPath/mysql ];then cd ${mysqlDir}/mysql-5.6.50 && cmake \ @@ -59,9 +69,11 @@ Install_mysql() -DWITH_PARTITION_STORAGE_ENGINE=1 \ -DEXTRA_CHARSETS=all \ -DDEFAULT_CHARSET=utf8mb4 \ + -DDEFAULT_COLLATION=utf8mb4_general_ci \ + $OPTIONS \ -DCMAKE_C_COMPILER=/usr/bin/gcc \ - -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ - -DDEFAULT_COLLATION=utf8mb4_general_ci + -DCMAKE_CXX_COMPILER=/usr/bin/g++ + make clean && make && make install && make clean diff --git a/plugins/mysql/versions/5.7/install.sh b/plugins/mysql/versions/5.7/install.sh index 8c374cca0..851cd656b 100755 --- a/plugins/mysql/versions/5.7/install.sh +++ b/plugins/mysql/versions/5.7/install.sh @@ -60,6 +60,16 @@ Install_mysql() cd ${mysqlDir} && tar -zxvf ${mysqlDir}/mysql-boost-${VERSION}.tar.gz fi + OPTIONS='' + ##check openssl version + OPENSSL_VERSION=`openssl version|awk '{print $2}'|awk -F '.' '{print $1}'` + if [ "${OPENSSL_VERSION}" -ge "3" ];then + #openssl version to high + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig + OPTIONS="-DWITH_SSL=${serverPath}/lib/openssl" + fi + if [ ! -d $serverPath/mysql ];then cd ${mysqlDir}/mysql-${VERSION} && cmake \ -DCMAKE_INSTALL_PREFIX=$serverPath/mysql \ @@ -75,6 +85,7 @@ Install_mysql() -DDEFAULT_CHARSET=utf8mb4 \ -DDEFAULT_COLLATION=utf8mb4_general_ci \ -DDOWNLOAD_BOOST=1 \ + $OPTIONS \ -DCMAKE_C_COMPILER=/usr/bin/gcc \ -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ -DWITH_BOOST=${mysqlDir}/mysql-${VERSION}/boost/ diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index 9603b6d4b..f892ad1d9 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -59,6 +59,15 @@ Install_mysql() cd ${mysqlDir} && tar -zxvf ${mysqlDir}/mysql-boost-8.0.25.tar.gz fi + OPTIONS='' + ##check openssl version + OPENSSL_VERSION=`openssl version|awk '{print $2}'|awk -F '.' '{print $1}'` + if [ "${OPENSSL_VERSION}" -ge "3" ];then + #openssl version to high + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig + OPTIONS="-DWITH_SSL=${serverPath}/lib/openssl" + fi if [ ! -d $serverPath/mysql ];then cd ${mysqlDir}/mysql-8.0.25 && ${INSTALL_CMD} \ @@ -76,6 +85,7 @@ Install_mysql() -DDEFAULT_COLLATION=utf8mb4_general_ci \ -DDOWNLOAD_BOOST=1 \ -DFORCE_INSOURCE_BUILD=1 \ + $OPTIONS \ -DCMAKE_C_COMPILER=/usr/bin/gcc \ -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ -DWITH_BOOST=${mysqlDir}/mysql-8.0.25/boost/ From 80879ffb537284ba1fe29c1c77958e67b7111718 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 13:46:02 +0800 Subject: [PATCH 035/263] =?UTF-8?q?=E6=9B=B4=E6=96=B0openssl=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/lib/openssl.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/plugins/php/lib/openssl.sh b/plugins/php/lib/openssl.sh index f3f834a3d..48c212d9f 100644 --- a/plugins/php/lib/openssl.sh +++ b/plugins/php/lib/openssl.sh @@ -13,13 +13,25 @@ rootPath=$(dirname "$rootPath") SERVER_ROOT=$rootPath/lib SOURCE_ROOT=$rootPath/source/lib +# if [ ! -d ${SERVER_ROOT}/openssl ];then +# cd ${SOURCE_ROOT} +# if [ ! -f ${SOURCE_ROOT}/openssl-1.0.2q.tar.gz ];then +# wget https://github.com/midoks/mdserver-web/releases/download/init/openssl-1.0.2q.tar.gz -T 20 +# fi +# tar -zxf openssl-1.0.2q.tar.gz +# cd openssl-1.0.2q +# ./config --openssldir=${SERVER_ROOT}/openssl zlib-dynamic shared +# make && make install +# fi + + if [ ! -d ${SERVER_ROOT}/openssl ];then cd ${SOURCE_ROOT} - if [ ! -f ${SOURCE_ROOT}/openssl-1.0.2q.tar.gz ];then - wget https://github.com/midoks/mdserver-web/releases/download/init/openssl-1.0.2q.tar.gz -T 20 + if [ ! -f ${SOURCE_ROOT}/openssl-1.1.1p.tar.gz ];then + wget -O ${SOURCE_ROOT}/openssl-1.1.1p.tar.gz https://www.openssl.org/source/openssl-1.1.1p.tar.gz fi - tar -zxf openssl-1.0.2q.tar.gz - cd openssl-1.0.2q + tar -zxf openssl-1.1.1p.tar.gz + cd openssl-1.1.1p ./config --openssldir=${SERVER_ROOT}/openssl zlib-dynamic shared make && make install fi From 03af9e8c0bfc43854b3f17874e46edc624f19961 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 14:35:31 +0800 Subject: [PATCH 036/263] Update openssl.sh --- plugins/php/lib/openssl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/php/lib/openssl.sh b/plugins/php/lib/openssl.sh index 48c212d9f..4d6294eac 100644 --- a/plugins/php/lib/openssl.sh +++ b/plugins/php/lib/openssl.sh @@ -30,9 +30,9 @@ if [ ! -d ${SERVER_ROOT}/openssl ];then if [ ! -f ${SOURCE_ROOT}/openssl-1.1.1p.tar.gz ];then wget -O ${SOURCE_ROOT}/openssl-1.1.1p.tar.gz https://www.openssl.org/source/openssl-1.1.1p.tar.gz fi - tar -zxf openssl-1.1.1p.tar.gz + tar -zxvf openssl-1.1.1p.tar.gz cd openssl-1.1.1p - ./config --openssldir=${SERVER_ROOT}/openssl zlib-dynamic shared + ./config --prefix=${SERVER_ROOT}/openssl zlib-dynamic shared make && make install fi From 9e16e464e64b2745a6741237f253e2b600239210 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 14:38:27 +0800 Subject: [PATCH 037/263] =?UTF-8?q?=E5=88=A0=E9=99=A4openresty1.11.2.5=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/openresty/info.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/openresty/info.json b/plugins/openresty/info.json index 29d2f0e54..22a15e32c 100755 --- a/plugins/openresty/info.json +++ b/plugins/openresty/info.json @@ -11,6 +11,6 @@ "home":"http://openresty.org", "date":"2017-11-24", "pid": "1", - "versions": ["1.11.2.5", "1.13.6.2","1.15.8.3","1.19.3.1","1.21.4.1"], - "updates": ["1.11.2.5", "1.13.6.2","1.15.8.3","1.19.3.1","1.21.4.1"] + "versions": [ "1.13.6.2","1.15.8.3","1.19.3.1","1.21.4.1"], + "updates": ["1.13.6.2","1.15.8.3","1.19.3.1","1.21.4.1"] } \ No newline at end of file From e334c1a70200b8a01d5edf835d39493a714fdf9d Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 15:35:24 +0800 Subject: [PATCH 038/263] up --- plugins/openresty/info.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/openresty/info.json b/plugins/openresty/info.json index 22a15e32c..606fdc769 100755 --- a/plugins/openresty/info.json +++ b/plugins/openresty/info.json @@ -11,6 +11,6 @@ "home":"http://openresty.org", "date":"2017-11-24", "pid": "1", - "versions": [ "1.13.6.2","1.15.8.3","1.19.3.1","1.21.4.1"], - "updates": ["1.13.6.2","1.15.8.3","1.19.3.1","1.21.4.1"] + "versions": ["1.15.8.3","1.17.8.2","1.19.3.1","1.21.4.1"], + "updates": ["1.15.8.3","1.17.8.2","1.19.3.1","1.21.4.1"] } \ No newline at end of file From f55b0c0a8b3774d2ad9814c1e153096d77202072 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 16:03:11 +0800 Subject: [PATCH 039/263] =?UTF-8?q?=E9=98=B6=E6=AE=B5=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mongodb/info.json | 6 ++--- plugins/mongodb/install.sh | 55 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 56 insertions(+), 5 deletions(-) diff --git a/plugins/mongodb/info.json b/plugins/mongodb/info.json index 6172e4ac6..3f3550329 100755 --- a/plugins/mongodb/info.json +++ b/plugins/mongodb/info.json @@ -4,15 +4,15 @@ "name": "mongodb", "title": "Mongodb", "shell": "install.sh", - "versions":["4.4.14","5.0.4"], - "updates":["4.4.14","5.0.4"], + "versions":["4.4","5.0"], + "updates":["4.4","5.0"], "tip": "soft", "checks": "server/mongodb", "path": "server/mongodb", "display": 1, "author": "mongodb", "date": "2021-11-23", - "home": "https://www.mongodb.com/", + "home": "https://www.mongodb.com/docs/v4.4/installation/", "type": 0, "pid": "2" } \ No newline at end of file diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh index 646d1dc48..a44d66a73 100755 --- a/plugins/mongodb/install.sh +++ b/plugins/mongodb/install.sh @@ -32,6 +32,11 @@ else OSNAME='unknow' fi + +SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` + + + Install_app_mac() { @@ -45,13 +50,59 @@ Install_app_mac() } + + +Install_Linux_Ubuntu() +{ +##################### Ubuntu start ##################### + if [ "$SYS_VERSION_ID" == "22" ]; then + echo "Not yet supported" + exit 1 + fi + + + wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - + sudo apt install gnupg + touch /etc/apt/sources.list.d/mongodb-org-4.4.list + lsb_release -dc + + echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list +##################### Ubuntu end ##################### +} + +Install_Linux_Debian() +{ +##################### debian start ##################### + +##################### debian end ##################### +} + + # https://repo.mongodb.org/yum/redhat/7/mongodb-org/5.0/x86_64/RPMS/mongodb-org-server-5.0.4-1.el7.x86_64.rpm -Install_app_linux(){ +Install_Linux_CentOS() +{ +##################### centos start ##################### if [ ! -f $serverPath/source/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm ];then wget -O $serverPath/source/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm https://repo.mongodb.org/yum/redhat/7/mongodb-org/5.0/x86_64/RPMS/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm fi - + rpm -ivh $serverPath/source/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm +##################### centos end ##################### +} + + +Install_app_linux() +{ + if [ "$OSNAME" == "ubuntu" ];then + Install_Linux_Ubuntu + elif [ "$OSNAME" == "debian" ];then + Install_Linux_Debian + elif [ "$OSNAME" == "centos" ];then + Install_Linux_CentOS + else + echo "Not yet supported" + exit 1 + fi } From 95496247c4ffd02848803d5bef8e364bc1a1d06c Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 16:30:24 +0800 Subject: [PATCH 040/263] Update install.sh --- plugins/pm2/install.sh | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/plugins/pm2/install.sh b/plugins/pm2/install.sh index eb543160f..9e96542ad 100755 --- a/plugins/pm2/install.sh +++ b/plugins/pm2/install.sh @@ -8,15 +8,46 @@ rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") - install_tmp=${rootPath}/tmp/mw_install.pl +_os=`uname` +echo "use system: ${_os}" +if [ ${_os} == "Darwin" ]; then + OSNAME='macos' +elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then + OSNAME='centos' +elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then + OSNAME='fedora' +elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then + OSNAME='rocky' +elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then + OSNAME='alma' +elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then + OSNAME='debian' +elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then + OSNAME='ubuntu' +elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then + OSNAME='raspbian' +else + OSNAME='unknow' +fi + + Install_pm2() { echo '正在安装脚本文件...' > $install_tmp - yum install -y nodejs + + curl -o- http://npmjs.org/install.sh | bash - npm install pm2 -g + + if [ "$OSNAME" == 'debian' ] && [ "$OSNAME" == 'ubuntu' ];then + apt install -y nodejs + apt install -y pm2 + else + yum install -y nodejs + npm install pm2 -g + fi + curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash mkdir -p $serverPath/pm2 From dc5e885a37c55d539f1fbbcee0c22eb5ea897061 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 16:53:32 +0800 Subject: [PATCH 041/263] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0IP=EF=BC=8C=E4=BC=98=E5=85=88=E9=80=89?= =?UTF-8?q?=E6=8B=A9ipv4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/mw.py | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/class/core/mw.py b/class/core/mw.py index 57bf3a9c4..80530088c 100755 --- a/class/core/mw.py +++ b/class/core/mw.py @@ -597,20 +597,29 @@ def getLocalIpBack(): def getLocalIp(): - # 取本地外网IP + filename = 'data/iplist.txt' try: - import re - filename = 'data/iplist.txt' ipaddress = readFile(filename) if not ipaddress or ipaddress == '127.0.0.1': - import urllib - url = 'https://v6r.ipip.net/?format=text' - req = urllib.request.urlopen(url, timeout=10) - ipaddress = req.read().decode('utf-8') - writeFile(filename, ipaddress) + raise return ipaddress - except Exception as ex: - return '127.0.0.1' + except Exception as e: + cmd = "curl -4 -sS --connect-timeout 5 -m 60 https://v6r.ipip.net/?format=text" + ip = execShell(cmd) + result = ip[0].strip() + if result == '': + raise + writeFile(filename, result) + return result + except Exception as e: + cmd = "curl -6 -sS --connect-timeout 5 -m 60 https://v6r.ipip.net/?format=text" + ip = execShell(cmd) + result = ip[0].strip() + if result == '': + return '127.0.0.1' + writeFile(filename, result) + return result + return '127.0.0.1' def inArray(arrays, searchStr): From 7cde08268d4ab5923dbae85ffdc7c87bf6dd05f3 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 18:06:45 +0800 Subject: [PATCH 042/263] Update setting.py --- setting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setting.py b/setting.py index c60fd7c9e..235927164 100755 --- a/setting.py +++ b/setting.py @@ -40,7 +40,7 @@ else: bind.append('0.0.0.0:%s' % mw_port) if workers > 2: - workers = 2 + workers = 1 threads = workers * 1 backlog = 512 From c53b209bbb060fef2a9b473de05bd4c1aec89796 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 18:18:08 +0800 Subject: [PATCH 043/263] up --- .gitignore | 1 + app.py | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index 11beb38ba..9b03b43d9 100644 --- a/.gitignore +++ b/.gitignore @@ -142,3 +142,4 @@ data/edate.pl plugins/l2tp plugins/openlitespeed plugins/gdrive +debug.out diff --git a/app.py b/app.py index 13e12f3be..e564d4253 100644 --- a/app.py +++ b/app.py @@ -1,5 +1,10 @@ # coding:utf-8 +# pip install profiler_online +# 性能测试 +# from profiler_online import run_profiler +# run_profiler() + from gevent import monkey monkey.patch_all() @@ -12,6 +17,12 @@ from route import app, socketio from gevent.pywsgi import WSGIServer from geventwebsocket.handler import WebSocketHandler + +from pyinstrument import Profiler +profiler = Profiler() +profiler.start() + + try: if __name__ == "__main__": From fa118cc815ec85201f7c0cce886a7d2e6bd65b2d Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 18:22:39 +0800 Subject: [PATCH 044/263] Update __init__.py --- route/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/route/__init__.py b/route/__init__.py index a8e374c0c..d1e3863a6 100755 --- a/route/__init__.py +++ b/route/__init__.py @@ -131,8 +131,8 @@ def publicObject(toObject, func, action=None, get=None): return mw.getJson(data) -@app.route("/test") -def test(): +@app.route("/debug") +def debug(): print(sys.version_info) print(session) os = mw.getOs() From 0985d84285d7e8e5c8876fd6f27ef3434d5639e6 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 18:33:25 +0800 Subject: [PATCH 045/263] Update app.py --- app.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app.py b/app.py index e564d4253..8e63dbc9b 100644 --- a/app.py +++ b/app.py @@ -17,12 +17,6 @@ from route import app, socketio from gevent.pywsgi import WSGIServer from geventwebsocket.handler import WebSocketHandler - -from pyinstrument import Profiler -profiler = Profiler() -profiler.start() - - try: if __name__ == "__main__": From d29f86d51ef7a7c642296c7371cfbb9b35cbe51a Mon Sep 17 00:00:00 2001 From: soxft Date: Fri, 1 Jul 2022 11:23:04 +0000 Subject: [PATCH 046/263] feta: openresty proxy --- class/core/site_api.py | 133 ++++++++++++++++++++++++++++++-- route/static/app/site.js | 163 ++++++++++++++++++++++++++++++--------- 2 files changed, 253 insertions(+), 43 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index 4de502389..b2960e729 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -3,6 +3,7 @@ import time import os import sys +from urllib.parse import urlparse import mw import re import json @@ -1344,13 +1345,129 @@ class site_api: # 读取 网站 反向代理列表 def getProxyListApi(self): - siteName = request.form.get('siteName', '') - conf_path = self.getHostConf(siteName) - old_conf = mw.readFile(conf_path) + _siteName = request.form.get('siteName', '') - return mw.returnJson(True, "ok", { - "conf_content": old_conf + data_path = self.getProxytDataPath(_siteName) + data_content = mw.readFile(data_path) + + # not exists + if data_content == False: + mw.execShell("mkdir {}/{}".format(self.proxyPath, _siteName)) + return mw.returnJson(True, "", {"result": [], "count": 0}) + + try: + data = json.loads(data_content) + except: + mw.execShell("rm -rf {}/{}".format(self.proxyPath, _siteName)) + return mw.returnJson(True, "", {"result": [], "count": 0}) + + return mw.returnJson(True, "ok", {"result": data, "count": len(data)}) + + + # 设置 网站 反向代理列表 + def setProxyApi(self): + _siteName = request.form.get('siteName', '') + _from = request.form.get('from', '') + _to = request.form.get('to', '') + _host = request.form.get('host', '') + + if _siteName == "" or _from == "" or _to == "" or _host == "": + return mw.returnJson(False, "必填项不能为空") + + data_path = self.getProxytDataPath(_siteName) + data_content = mw.readFile( + data_path) if os.path.exists(data_path) else "" + data = json.loads(data_content) if data_content != "" else [] + + rep = "http(s)?\:\/\/([a-zA-Z0-9][-a-zA-Z0-9]{0,62}\.)+([a-zA-Z0-9][a-zA-Z0-9]{0,62})+.?" + if not re.match(rep, _to): + return mw.returnJson(False, "错误的目标地址!") + + # get host from url + try: + if _host == "$host": + host_tmp = urlparse(_to) + _host = host_tmp.netloc + except: + return mw.returnJson(False, "错误的目标地址") + + tpl = """ +#PROXY-START/ +location ~* \.(gif|png|jpg|css|js|woff|woff2)$ +{ + proxy_pass {to}; + proxy_set_header Host {host}; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header REMOTE-HOST $remote_addr; + expires 12h; +} +location ~* ^{from}(.*)$ { + proxy_pass {to}; + proxy_set_header Host {host}; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header REMOTE-HOST $remote_addr; + + add_header X-Cache $upstream_cache_status; + proxy_ignore_headers Set-Cookie Cache-Control expires; + add_header Cache-Control no-cache; +} +#PROXY-END/ + """ + + # replace + if _from[0] != '/': + _from = '/' + _from + tpl = tpl.replace("{from}", _from, 999) + tpl = tpl.replace("{to}", _to) + tpl = tpl.replace("{host}", _host, 999) + + _id = mw.md5("{}+{}+{}".format(_from, _to, _siteName)) + for item in data: + if item["id"] == _id: + return mw.returnJson(False, "已存在该规则!") + if item["from"] == _from: + return mw.returnJson(False, "已存在该规则!") + data.append({ + "from": _from, + "to": _to, + "host": _host, + "id": _id }) + mw.writeFile(data_path, json.dumps(data)) + mw.writeFile( + "{}/{}.conf".format(self.getProxyPath(_siteName), _id), tpl) + mw.restartWeb() + return mw.returnJson(True, "ok", { + "hash": _id + }) + + + def delProxyApi(self): + _siteName = request.form.get("siteName", '') + _id = request.form.get("id", '') + if _id == '' or _siteName == '': + return mw.returnJson(False, "必填项不能为空!") + + try: + data_path = self.getProxytDataPath(_siteName) + data_content = mw.readFile( + data_path) if os.path.exists(data_path) else "" + data = json.loads(data_content) if data_content != "" else [] + for item in data: + if item["id"] == _id: + data.remove(item) + break + # write database + mw.writeFile(data_path, json.dumps(data)) + # remove conf file + mw.execShell( + "rm -rf {}/{}.conf".format(self.getProxyPath(_siteName), _id)) + except: + return mw.returnJson(False, "删除失败!") + return mw.returnJson(True, "删除成功!") + def getSiteTypesApi(self): # 取网站分类 @@ -1507,13 +1624,13 @@ class site_api: return "{}/{}/data.json".format(self.redirectPath, siteName) def getRedirectPath(self, siteName): - return "{}/{}/".format(self.redirectPath, siteName) + return "{}/{}".format(self.redirectPath, siteName) def getProxytDataPath(self, siteName): return "{}/{}/data.json".format(self.proxyPath, siteName) - def getProxyDataPath(self, siteName): - return "{}/{}/data.json".format(self.proxyPath, siteName) + def getProxyPath(self, siteName): + return "{}/{}".format(self.proxyPath, siteName) def getDirBindRewrite(self, siteName, dirname): return self.rewritePath + '/' + siteName + '_' + dirname + '.conf' diff --git a/route/static/app/site.js b/route/static/app/site.js index 9ad7e4432..dd6ef6853 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -1366,41 +1366,6 @@ function delDirBind(id,siteId){ }); } -//反向代理 -function toProxy(siteName, type, obj) { - if (type == 1) { - - return; - } - - var body = '
\ -
\ - \ -
\ -
\ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ -
代理目录目标地址操作
\ -
\ -
'; - $("#webedit-con").html(body); - var loading = layer.load() - $.post("/site/get_proxy_list", { - siteName: siteName - },function (res) { - var res = JSON.parse(res) - console.log(res) - }) -} - //开启缓存 function openCache(siteName){ var loadT = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']}); @@ -1623,6 +1588,134 @@ function to301(siteName, type, obj){ }); } + +//反向代理 +function toProxy(siteName, type, obj) { + + + // 设置 页面展示 + if(type == 1) { + var proxy_form = layer.open({ + type: 1, + skin: 'demo-class', + area: '650px', + title: "创建反向代理", + closeBtn: 2, + shift: 5, + shadeClose: false, + content: "
" + + "
"+ + "目标URL" + + "
" + + "" + + "
" + + "
" + + "
" + + "代理目录" + + "
" + + "" + + "发送域名" + + "" + + "
" + + "
" + + "
" + + "
" + }); + setTimeout(function() { + $('.btn-colse-proxy').click(function() { + layer.close(proxy_form); + }); + $('.btn-submit-proxy').click(function() { + var to = $('[name="to"]').val(); + var from = $('[name="from"]').val(); + var host = $('[name="host"]').val(); + + $.post('/site/set_proxy', { + siteName: siteName, + from: from, + to: to, + host: host, + }, function(res) { + res = JSON.parse(res); + if (res.status) { + layer.close(proxy_form); + toProxy(siteName) + } else { + layer.msg(res.msg, { + icon: 2 + }); + } + }); + }); + }, 100); + } + + if (type == 2) { + $.post('/site/del_proxy', { + siteName: siteName, + id: obj, + }, function(res) { + res = JSON.parse(res); + if (res.status == true) { + layer.msg('删除成功', { + time: 1000, + icon: 1 + }); + toProxy(siteName) + } else { + layer.msg(res.msg, { + time: 1000, + icon: 2 + }); + } + }); + return + } + + + var body = '
\ +
\ + \ +
\ +
\ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +
代理目录目标地址操作
\ +
\ +
'; + $("#webedit-con").html(body); + + var loadT = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']}); + $.post("/site/get_proxy_list", { + siteName: siteName + },function (response) { + layer.close(loadT); + $("#md-301-loading").remove(); + let res = JSON.parse(response); + if (res.status === true) { + let data = res.data.result; + data.forEach(function(item){ + let tmp = '\ + '+item.from+'\ + '+item.to+'\ + 删除\ + '; + $("#md-301-body").append(tmp); + }) + } else { + layer.msg(res.msg, {icon:2}); + } +}) +} + //文件验证 // function file_check(){ // $(".check_message").html('
\ From 181d419a4136f91cf8c3438096abed2a2869ce61 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 20:33:06 +0800 Subject: [PATCH 047/263] Update setting.py --- setting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setting.py b/setting.py index 235927164..c60fd7c9e 100755 --- a/setting.py +++ b/setting.py @@ -40,7 +40,7 @@ else: bind.append('0.0.0.0:%s' % mw_port) if workers > 2: - workers = 1 + workers = 2 threads = workers * 1 backlog = 512 From 2e33c07784e493b20f7db017c4c71c65e263228e Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 21:13:58 +0800 Subject: [PATCH 048/263] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=AB=99=E7=82=B9?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- route/static/app/site.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/route/static/app/site.js b/route/static/app/site.js index 200515040..ff68dec97 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -163,22 +163,21 @@ function setWebPs(b, e, a) { },'json'); } -function checkWebStatus(){ - data = syncPost('/site/check_web_status') - if (data.status){ - return true - } - layer.msg(data.msg,{icon:0,time:3000,shade: [0.3, "#000"]}) - return false +//创建站点前,检查服务是否开启 +function webAdd(type){ + loading = layer.msg('正在检查是否开启OpenResty服务!',{icon:16,time:0,shade: [0.3, "#000"]}) + $.post('/site/check_web_status', function(data){ + layer.close(loading); + if (data.status){ + webAddPage(type) + } else { + layer.msg(data.msg,{icon:0,time:3000,shade: [0.3, "#000"]}) + } + },'json'); } //添加站点 -function webAdd(type) { - checkPass = checkWebStatus() - //未开启openresty,不能继续 - if (!checkPass){ - return - } +function webAddPage(type) { if (type == 1) { var array; From a8377f397e45dc13417992dd360869ec569eb3b9 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 1 Jul 2022 22:06:42 +0800 Subject: [PATCH 049/263] =?UTF-8?q?=E5=90=88=E5=B9=B61:=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=AB=99=E7=82=B9=E4=B8=80=E8=B5=B7=E5=88=A0=E9=99=A4=E9=87=8D?= =?UTF-8?q?=E5=AE=9A=E5=90=91=E5=92=8C=E4=BB=A3=E7=90=86=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/site_api.py | 49 ++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index 9f94ccd25..ef661813e 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -44,7 +44,7 @@ class site_api: if not os.path.exists(self.redirectPath): mw.execShell("mkdir -p " + self.redirectPath + " && chmod -R 755 " + self.redirectPath) - + self.proxyPath = self.setupPath + '/nginx/proxy' if not os.path.exists(self.proxyPath): mw.execShell("mkdir -p " + self.proxyPath + @@ -1370,15 +1370,15 @@ class site_api: # 读取 网站 反向代理列表 def getProxyListApi(self): _siteName = request.form.get('siteName', '') - + data_path = self.getProxytDataPath(_siteName) data_content = mw.readFile(data_path) - + # not exists if data_content == False: mw.execShell("mkdir {}/{}".format(self.proxyPath, _siteName)) return mw.returnJson(True, "", {"result": [], "count": 0}) - + try: data = json.loads(data_content) except: @@ -1386,27 +1386,26 @@ class site_api: return mw.returnJson(True, "", {"result": [], "count": 0}) return mw.returnJson(True, "ok", {"result": data, "count": len(data)}) - # 设置 网站 反向代理列表 def setProxyApi(self): - _siteName = request.form.get('siteName', '') - _from = request.form.get('from', '') - _to = request.form.get('to', '') - _host = request.form.get('host', '') - + _siteName = request.form.get('siteName', '') + _from = request.form.get('from', '') + _to = request.form.get('to', '') + _host = request.form.get('host', '') + if _siteName == "" or _from == "" or _to == "" or _host == "": return mw.returnJson(False, "必填项不能为空") - + data_path = self.getProxytDataPath(_siteName) data_content = mw.readFile( data_path) if os.path.exists(data_path) else "" data = json.loads(data_content) if data_content != "" else [] - + rep = "http(s)?\:\/\/([a-zA-Z0-9][-a-zA-Z0-9]{0,62}\.)+([a-zA-Z0-9][a-zA-Z0-9]{0,62})+.?" if not re.match(rep, _to): return mw.returnJson(False, "错误的目标地址!") - + # get host from url try: if _host == "$host": @@ -1414,7 +1413,7 @@ class site_api: _host = host_tmp.netloc except: return mw.returnJson(False, "错误的目标地址") - + tpl = """ #PROXY-START/ location ~* \.(gif|png|jpg|css|js|woff|woff2)$ @@ -1439,7 +1438,7 @@ location ~* ^{from}(.*)$ { } #PROXY-END/ """ - + # replace if _from[0] != '/': _from = '/' + _from @@ -1466,8 +1465,7 @@ location ~* ^{from}(.*)$ { return mw.returnJson(True, "ok", { "hash": _id }) - - + def delProxyApi(self): _siteName = request.form.get("siteName", '') _id = request.form.get("id", '') @@ -1492,7 +1490,6 @@ location ~* ^{from}(.*)$ { return mw.returnJson(False, "删除失败!") return mw.returnJson(True, "删除成功!") - def getSiteTypesApi(self): # 取网站分类 data = mw.M("site_types").field("id,name").order("id asc").select() @@ -1649,10 +1646,10 @@ location ~* ^{from}(.*)$ { def getRedirectPath(self, siteName): return "{}/{}".format(self.redirectPath, siteName) - + def getProxytDataPath(self, siteName): return "{}/{}/data.json".format(self.proxyPath, siteName) - + def getProxyPath(self, siteName): return "{}/{}".format(self.proxyPath, siteName) @@ -2016,18 +2013,28 @@ location /{ errLogPath = mw.getLogsDir() + '/' + webname + '.error.log' confFile = self.setupPath + '/nginx/vhost/' + webname + '.conf' rewriteFile = self.setupPath + '/nginx/rewrite/' + webname + '.conf' - rewriteFile = self.setupPath + '/nginx/pass/' + webname + '.conf' + passFile = self.setupPath + '/nginx/pass/' + webname + '.conf' keyPath = self.sslDir + webname + '/privkey.pem' certPath = self.sslDir + webname + '/fullchain.pem' logs = [assLogPath, errLogPath, confFile, rewriteFile, + passFile, keyPath, certPath] for i in logs: mw.deleteFile(i) + # 重定向目录 + redirectDir = self.setupPath + '/nginx/redirect/' + webname + if os.path.exists(redirectDir): + mw.execShell('rm -rf ' + redirectDir) + # 代理目录 + proxyDir = self.setupPath + '/nginx/proxy/' + webname + if os.path.exists(proxyDir): + mw.execShell('rm -rf ' + proxyDir) + def delete(self, sid, webname, path): self.deleteWSLogs(webname) if path == '1': From d98c3485991117d622d08da2de6cb5a633cf4220 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 00:03:42 +0800 Subject: [PATCH 050/263] =?UTF-8?q?#=20mysql8.0=20=E5=9C=A8ubuntu22?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E7=9A=84=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install/ubuntu.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 8defa90b2..0e2bd3379 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -64,9 +64,11 @@ cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data + +# mysql8.0 在ubuntu需要的库 +apt install -y patchelf + VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` - - if [ "${VERSION_ID}" == "22.04" ];then pip3 install -U --force-reinstall --no-binary :all: gevent fi From 0bbce8fda072c4b5f4e8fc2bee8990f16bec8549 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 00:03:53 +0800 Subject: [PATCH 051/263] Update ubuntu.sh --- scripts/install/ubuntu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 0e2bd3379..6d4a66c2e 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -65,7 +65,7 @@ chmod 755 /www/server/mdserver-web/data -# mysql8.0 在ubuntu需要的库 +# mysql8.0 在ubuntu22需要的库 apt install -y patchelf VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` From 5937f7bc3e65eaa1c77b032958b14f51ccd38622 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 00:38:46 +0800 Subject: [PATCH 052/263] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 没有想到,一晚上搞定。OK,完美。后续测试 --- class/core/site_api.py | 85 +++++++++++++++++++++++++++++++++++++----- data/tpl/nginx.conf | 13 +++---- 2 files changed, 80 insertions(+), 18 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index ef661813e..a20aea15b 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -426,7 +426,7 @@ class site_api: 'csr': csr, 'type': stype, 'httpTohttps': toHttps} return mw.returnJson(True, 'OK', data) - def setSslApi(self): + def create_let(self): siteName = request.form.get('siteName', '') key = request.form.get('key', '') csr = request.form.get('csr', '') @@ -580,9 +580,12 @@ class site_api: file = self.getHostConf(siteName) if os.path.exists(file): siteConf = mw.readFile(file) - if siteConf.find('301-START') != -1: + if siteConf.find('301-END') != -1: return mw.returnJson(False, '检测到您的站点做了301重定向设置,请先关闭重定向!') + if siteConf.find('PROXY-END') != -1: + return mw.returnJson(False, '检测到您的站点做了反向代理设置,请先关闭反向代理!') + letpath = self.sslDir + siteName csrpath = letpath + "/fullchain.pem" # 生成证书路径 keypath = letpath + "/privkey.pem" # 密钥文件路径 @@ -1206,6 +1209,31 @@ class site_api: path = request.form.get('path', '0') return self.delete(sid, webname, path) + # 操作 重定向配置 + def operateRedirectConf(self, siteName, method='start'): + vhost_file = self.vhostPath + '/' + siteName + '.conf' + content = mw.readFile(vhost_file) + + proxy_cnf = ''' + #301-START + include %s/%s/*.conf + #301-END +''' % (self.proxyPath, siteName) + + proxy_cnf_source = ''' + #301-START +''' + + if content.find('#301-END') != -1: + if method == 'stop': + rep = '#301-START(\n|.){1,500}#301-END' + content = re.sub(rep, '#301-START', content) + else: + if method == 'start': + content = re.sub(proxy_cnf_source, proxy_cnf, content) + + mw.writeFile(vhost_file, content) + # get_redirect_status def getRedirectApi(self): _siteName = request.form.get("siteName", '') @@ -1260,8 +1288,9 @@ class site_api: if rule_test != True: mw.writeFile("{}/{}/{}.conf".format(self.redirectPath, _siteName, _id), _old_config) - return mw.returnJson(False, "Nginx 配置测试不通过, 请重试: {}".format(rule_test)) + return mw.returnJson(False, "OpenResty 配置测试不通过, 请重试: {}".format(rule_test)) + self.operateRedirectConf(siteName, 'start') mw.restartWeb() return mw.returnJson(True, "ok") @@ -1360,6 +1389,9 @@ class site_api: break # write database mw.writeFile(data_path, json.dumps(data)) + # data is empty ,should stop + if len(data) == 0: + self.operateRedirectConf(siteName, 'stop') # remove conf file mw.execShell( "rm -rf {}/{}.conf".format(self.getRedirectPath(_siteName), _id)) @@ -1367,6 +1399,31 @@ class site_api: return mw.returnJson(False, "删除失败!") return mw.returnJson(True, "删除成功!") + # 操作 反向代理配置 + def operateProxyConf(self, siteName, method='start'): + vhost_file = self.vhostPath + '/' + siteName + '.conf' + content = mw.readFile(vhost_file) + + proxy_cnf = ''' + #PROXY-START + include %s/%s/*.conf + #PROXY-END +''' % (self.proxyPath, siteName) + + proxy_cnf_source = ''' + #PROXY-START +''' + + if content.find('#PROXY-END') != -1: + if method == 'stop': + rep = '#PROXY-START(\n|.){1,500}#PROXY-END' + content = re.sub(rep, '#PROXY-START', content) + else: + if method == 'start': + content = re.sub(proxy_cnf_source, proxy_cnf, content) + + mw.writeFile(vhost_file, content) + # 读取 网站 反向代理列表 def getProxyListApi(self): _siteName = request.form.get('siteName', '') @@ -1387,7 +1444,7 @@ class site_api: return mw.returnJson(True, "ok", {"result": data, "count": len(data)}) - # 设置 网站 反向代理列表 + # 设置 网站 反向代理列表 def setProxyApi(self): _siteName = request.form.get('siteName', '') _from = request.form.get('from', '') @@ -1461,6 +1518,8 @@ location ~* ^{from}(.*)$ { mw.writeFile(data_path, json.dumps(data)) mw.writeFile( "{}/{}.conf".format(self.getProxyPath(_siteName), _id), tpl) + + self.operateProxyConf(_siteName, 'start') mw.restartWeb() return mw.returnJson(True, "ok", { "hash": _id @@ -1483,11 +1542,17 @@ location ~* ^{from}(.*)$ { break # write database mw.writeFile(data_path, json.dumps(data)) + + # data is empty,should stop + if len(data) == 0: + self.operateProxyConf(_siteName, 'stop') # remove conf file mw.execShell( "rm -rf {}/{}.conf".format(self.getProxyPath(_siteName), _id)) except: return mw.returnJson(False, "删除失败!") + + mw.restartWeb() return mw.returnJson(True, "删除成功!") def getSiteTypesApi(self): @@ -1909,10 +1974,10 @@ location ~* ^{from}(.*)$ { def createRootDir(self, path): if not os.path.exists(path): os.makedirs(path) - if not mw.isAppleSystem(): - mw.execShell('chown -R www:www ' + path) - mw.writeFile(path + '/index.html', 'Work has started!!!') - mw.execShell('chmod -R 755 ' + path) + if not mw.isAppleSystem(): + mw.execShell('chown -R www:www ' + path) + mw.writeFile(path + '/index.html', 'Work has started!!!') + mw.execShell('chmod -R 755 ' + path) def nginxAddDomain(self, webname, domain, port): file = self.getHostConf(webname) @@ -1950,8 +2015,8 @@ location ~* ^{from}(.*)$ { content = content.replace('{$PHP_DIR}', self.setupPath + '/php') content = content.replace('{$PHPVER}', self.phpVersion) content = content.replace('{$OR_REWRITE}', self.rewritePath) - content = content.replace('{$OR_REDIRECT}', self.redirectPath) - content = content.replace('{$OR_PROXY}', self.proxyPath) + # content = content.replace('{$OR_REDIRECT}', self.redirectPath) + # content = content.replace('{$OR_PROXY}', self.proxyPath) logsPath = mw.getLogsDir() content = content.replace('{$LOGPATH}', logsPath) diff --git a/data/tpl/nginx.conf b/data/tpl/nginx.conf index cb7c79ad3..ab258fc46 100755 --- a/data/tpl/nginx.conf +++ b/data/tpl/nginx.conf @@ -8,6 +8,10 @@ server #SSL-START #error_page 404/404.html; #SSL-END + + #301-START + + #PROXY-START #ERROR-PAGE-START error_page 404 /404.html; @@ -21,14 +25,7 @@ server #REWRITE-START include {$OR_REWRITE}/{$SERVER_NAME}.conf; #REWRITE-END - - #301-START - include {$OR_REDIRECT}/{$SERVER_NAME}/*.conf; - #301-END - - #PROXY-START - include {$OR_PROXY}/{$SERVER_NAME}/*.conf; - #PROXY-END + #禁止访问的文件或目录 location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md) From bc2b1baef6ea6f146e1026cf1b91c8962d3532f2 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 01:00:33 +0800 Subject: [PATCH 053/263] =?UTF-8?q?=E4=B9=90=E6=9E=81=E7=94=9F=E6=82=B2?= =?UTF-8?q?=EF=BC=8C=E5=8F=88=E8=B0=83=E8=AF=95=E4=BA=86=E4=B8=80=E4=BC=9A?= =?UTF-8?q?=E5=84=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/site_api.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index a20aea15b..beef13b93 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -1214,23 +1214,23 @@ class site_api: vhost_file = self.vhostPath + '/' + siteName + '.conf' content = mw.readFile(vhost_file) - proxy_cnf = ''' + cnf_301 = ''' #301-START include %s/%s/*.conf #301-END ''' % (self.proxyPath, siteName) - proxy_cnf_source = ''' + cnf_301_source = ''' #301-START ''' - + # print('operateRedirectConf', content.find('#301-END')) if content.find('#301-END') != -1: if method == 'stop': rep = '#301-START(\n|.){1,500}#301-END' content = re.sub(rep, '#301-START', content) else: if method == 'start': - content = re.sub(proxy_cnf_source, proxy_cnf, content) + content = re.sub(cnf_301_source, cnf_301, content) mw.writeFile(vhost_file, content) @@ -1290,7 +1290,7 @@ class site_api: _siteName, _id), _old_config) return mw.returnJson(False, "OpenResty 配置测试不通过, 请重试: {}".format(rule_test)) - self.operateRedirectConf(siteName, 'start') + self.operateRedirectConf(_siteName, 'start') mw.restartWeb() return mw.returnJson(True, "ok") @@ -1368,6 +1368,8 @@ class site_api: mw.writeFile(data_path, json.dumps(data)) mw.writeFile( "{}/{}.conf".format(self.getRedirectPath(_siteName), _id), file_content) + + self.operateRedirectConf(_siteName, 'start') mw.restartWeb() return mw.returnJson(True, "ok") @@ -1391,7 +1393,7 @@ class site_api: mw.writeFile(data_path, json.dumps(data)) # data is empty ,should stop if len(data) == 0: - self.operateRedirectConf(siteName, 'stop') + self.operateRedirectConf(_siteName, 'stop') # remove conf file mw.execShell( "rm -rf {}/{}.conf".format(self.getRedirectPath(_siteName), _id)) From aacf820c85e7ae31339a9b7216f576a6398c6c73 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 01:40:44 +0800 Subject: [PATCH 054/263] Update site_api.py --- class/core/site_api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index beef13b93..15e6c48ed 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -1216,9 +1216,9 @@ class site_api: cnf_301 = ''' #301-START - include %s/%s/*.conf + include %s #301-END -''' % (self.proxyPath, siteName) +''' % (self.getRewriteConf( siteName)) cnf_301_source = ''' #301-START @@ -1408,9 +1408,9 @@ class site_api: proxy_cnf = ''' #PROXY-START - include %s/%s/*.conf + include %s #PROXY-END -''' % (self.proxyPath, siteName) +''' % (self.getProxyPath(siteName)) proxy_cnf_source = ''' #PROXY-START From 42a4dd5a51a915f0ea1ca3e4eb29b3d5ef4ffb5a Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 01:41:24 +0800 Subject: [PATCH 055/263] Update site_api.py --- class/core/site_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index 15e6c48ed..cfee557cc 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -1216,7 +1216,7 @@ class site_api: cnf_301 = ''' #301-START - include %s + include %s; #301-END ''' % (self.getRewriteConf( siteName)) @@ -1408,7 +1408,7 @@ class site_api: proxy_cnf = ''' #PROXY-START - include %s + include %s; #PROXY-END ''' % (self.getProxyPath(siteName)) From aa94eaeb3077ac32ebec0939d74ec5b99523a9ec Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 01:48:05 +0800 Subject: [PATCH 056/263] Update site_api.py --- class/core/site_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index cfee557cc..51afe2c06 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -1218,7 +1218,7 @@ class site_api: #301-START include %s; #301-END -''' % (self.getRewriteConf( siteName)) +''' % (self.getRedirectPath( siteName)) cnf_301_source = ''' #301-START From b62582e76de57e12b2a22393ac2f349c4d010772 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 01:58:44 +0800 Subject: [PATCH 057/263] Update site_api.py --- class/core/site_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index 51afe2c06..911011b1f 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -1216,7 +1216,7 @@ class site_api: cnf_301 = ''' #301-START - include %s; + include %s/*.conf; #301-END ''' % (self.getRedirectPath( siteName)) @@ -1408,7 +1408,7 @@ class site_api: proxy_cnf = ''' #PROXY-START - include %s; + include %s/*.conf; #PROXY-END ''' % (self.getProxyPath(siteName)) From 7bde9375acb2086494c969201088973c2a04f564 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 12:00:48 +0800 Subject: [PATCH 058/263] =?UTF-8?q?fix=E3=80=82=E6=89=8B=E6=8A=96=E6=94=B9?= =?UTF-8?q?=E9=94=99=E4=BA=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/site_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index 911011b1f..d5b770604 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -426,7 +426,7 @@ class site_api: 'csr': csr, 'type': stype, 'httpTohttps': toHttps} return mw.returnJson(True, 'OK', data) - def create_let(self): + def setSslApi(self): siteName = request.form.get('siteName', '') key = request.form.get('key', '') csr = request.form.get('csr', '') From 32fdbe7ca47489934716a3a18e4361691394b128 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 12:17:51 +0800 Subject: [PATCH 059/263] Update debug.sh --- scripts/quick/debug.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/quick/debug.sh b/scripts/quick/debug.sh index b6a2fa87b..d8855d5ec 100755 --- a/scripts/quick/debug.sh +++ b/scripts/quick/debug.sh @@ -24,7 +24,7 @@ fi -PHP_VER_LIST=(53 54 55 56 71 72 73 74 80 81) +PHP_VER_LIST=(53 54 55 56 70 71 72 73 74 80 81) # PHP_VER_LIST=(81) for PHP_VER in ${PHP_VER_LIST[@]}; do echo "php${PHP_VER} -- start" From da6f66866b64ae642233045d46985d2e576d21ea Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 13:12:32 +0800 Subject: [PATCH 060/263] =?UTF-8?q?ftp=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/pureftp/index.py | 120 +++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 69 deletions(-) diff --git a/plugins/pureftp/index.py b/plugins/pureftp/index.py index ab53099dc..d406bc32c 100755 --- a/plugins/pureftp/index.py +++ b/plugins/pureftp/index.py @@ -59,6 +59,13 @@ def getArgs(): return tmp +def checkArgs(data, ck=[]): + for i in range(len(ck)): + if not ck[i] in data: + return (False, mw.returnJson(False, '参数:(' + ck[i] + ')没有!')) + return (True, mw.returnJson(True, 'ok')) + + def status(): cmd = "ps -ef|grep pure-ftpd |grep -v grep | grep -v python | awk '{print $2}'" data = mw.execShell(cmd) @@ -122,72 +129,61 @@ def initDreplace(): return file_bin -def start(): +def pfOp(method): file = initDreplace() - data = mw.execShell(file + ' start') + + if not mw.isAppleSystem(): + data = mw.execShell('systemctl ' + method + ' pureftp') + if data[1] == '': + return 'ok' + return 'fail' + + data = mw.execShell(file + ' ' + method) if data[1] == '': return 'ok' return data[1] +def start(): + return pfOp('start') + + def stop(): - file = initDreplace() - data = mw.execShell(file + ' stop') - if data[1] == '': - return 'ok' - return data[1] + return pfOp('stop') def restart(): - file = initDreplace() - data = mw.execShell(file + ' restart') - if data[1] == '': - return 'ok' - return 'fail' + return pfOp('restart') def reload(): - file = initDreplace() - data = mw.execShell(file + ' reload') - if data[1] == '': - return 'ok' - return data[1] + return pfOp('reload') def initdStatus(): - if not app_debug: - os_name = mw.getOs() - if os_name == 'darwin': - return "Apple Computer does not support" - initd_bin = getInitDFile() - if os.path.exists(initd_bin): - return 'ok' - return 'fail' + if mw.isAppleSystem(): + return "Apple Computer does not support" + + shell_cmd = 'systemctl status pureftp | grep loaded | grep "enabled;"' + data = mw.execShell(shell_cmd) + if data[0] == '': + return 'fail' + return 'ok' def initdInstall(): - import shutil - if not app_debug: - os_name = mw.getOs() - if os_name == 'darwin': - return "Apple Computer does not support" + if mw.isAppleSystem(): + return "Apple Computer does not support" - source_bin = initDreplace() - initd_bin = getInitDFile() - shutil.copyfile(source_bin, initd_bin) - mw.execShell('chmod +x ' + initd_bin) - mw.execShell('chkconfig --add ' + getPluginName()) + mw.execShell('systemctl start pureftp') return 'ok' def initdUinstall(): - if not app_debug: - os_name = mw.getOs() - if os_name == 'darwin': - return "Apple Computer does not support" - initd_bin = getInitDFile() - os.remove(initd_bin) - mw.execShell('chkconfig --del ' + getPluginName()) + if mw.isAppleSystem(): + return "Apple Computer does not support" + + mw.execShell('systemctl stop pureftp') return 'ok' @@ -245,8 +241,9 @@ def pftpStart(username): def pftpReload(): - mw.execShell(getServerDir() + '/bin/pure-pw mkdb ' + - getServerDir() + '/etc/pureftpd.pdb') + cmd = getServerDir() + '/bin/pure-pw mkdb ' + + getServerDir() + '/etc/pureftpd.pdb' + mw.execShell(cmd) def getWwwDir(): @@ -311,19 +308,11 @@ def getFtpList(): def addFtp(): import urllib args = getArgs() - if not 'ftp_username' in args: - return 'ftp_username missing' + data = checkArgs(args, ['ftp_username', 'ftp_password', 'path', 'ps']) + if not data[0]: + return data[1] - if not 'ftp_password' in args: - return 'ftp_password missing' - - if not 'path' in args: - return 'path missing' - - if not 'ps' in args: - return 'ps missing' - - path = urllib.unquote(args['path']) + path = urllib.request.unquote(args['path']) user = args['ftp_username'] pwd = args['ftp_password'] ps = args['ps'] @@ -342,11 +331,9 @@ def addFtp(): def delFtp(): args = getArgs() - if not 'id' in args: - return 'ftp_username missing' - - if not 'username' in args: - return 'username missing' + data = checkArgs(args, ['id', 'username']) + if not data[0]: + return data[1] mw.execShell(getServerDir() + '/bin/pure-pw userdel ' + args['username']) @@ -359,14 +346,9 @@ def delFtp(): def modFtp(): args = getArgs() - if not 'id' in args: - return 'id missing' - - if not 'name' in args: - return 'name missing' - - if not 'password' in args: - return 'password missing' + data = checkArgs(args, ['id', 'name', 'password']) + if not data[0]: + return data[1] conn = pftpDB() data = pftpMod(args['name'], args['password']) From 701440e21e15a3f4ab39961214a959fb7a248a64 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 13:33:05 +0800 Subject: [PATCH 061/263] Update index.py --- plugins/pureftp/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/pureftp/index.py b/plugins/pureftp/index.py index d406bc32c..597216b0d 100755 --- a/plugins/pureftp/index.py +++ b/plugins/pureftp/index.py @@ -241,7 +241,7 @@ def pftpStart(username): def pftpReload(): - cmd = getServerDir() + '/bin/pure-pw mkdb ' + + cmd = getServerDir() + '/bin/pure-pw mkdb ' + \ getServerDir() + '/etc/pureftpd.pdb' mw.execShell(cmd) From 2f18e34f512b28feff3d92114ca304ad1febe2dd Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 13:42:29 +0800 Subject: [PATCH 062/263] Update ftp.js --- plugins/pureftp/js/ftp.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/pureftp/js/ftp.js b/plugins/pureftp/js/ftp.js index 3dc20ab1f..87d4c605c 100755 --- a/plugins/pureftp/js/ftp.js +++ b/plugins/pureftp/js/ftp.js @@ -119,9 +119,9 @@ function addFtp(type) { var data = $("#ftpAdd").serialize(); ftpPost('add_ftp', data, function(data){ if (data.data == 'ok'){ - layer.msg('添加成功!', {icon: 1}); + layer.msg('添加成功!', {icon: 1,time:3000}); } else { - layer.msg(rdata.data, {icon: 5}); + layer.msg(rdata.data, {icon: 5,time:3000}); } ftpList(); layer.close(loadT); From 64b27ab5dff1afeb1d526c44794da9d5176f317c Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 13:58:37 +0800 Subject: [PATCH 063/263] Update index.py --- plugins/pureftp/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/pureftp/index.py b/plugins/pureftp/index.py index 597216b0d..bdce016f1 100755 --- a/plugins/pureftp/index.py +++ b/plugins/pureftp/index.py @@ -306,13 +306,13 @@ def getFtpList(): def addFtp(): - import urllib + import urllib.parse args = getArgs() data = checkArgs(args, ['ftp_username', 'ftp_password', 'path', 'ps']) if not data[0]: return data[1] - path = urllib.request.unquote(args['path']) + path = urllib.parse.unquote(args['path']) user = args['ftp_username'] pwd = args['ftp_password'] ps = args['ps'] From f1c3f0417671316e7a02ac1186913d03365893e5 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 14:42:22 +0800 Subject: [PATCH 064/263] Update index.py --- plugins/mysql/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index d13d6e5db..b548e4e51 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -572,7 +572,7 @@ def setMyPort(): def runInfo(): if status(version) == 'stop': - return mw.returnJson(false, 'MySQL未启动', []) + return mw.returnJson(False, 'MySQL未启动', []) db = pMysqlDb() data = db.query('show global status') @@ -1470,7 +1470,7 @@ def setDbSlave(version): def getMasterStatus(version=''): if status(version) == 'stop': - return mw.returnJson(false, 'MySQL未启动,或正在启动中...!', []) + return mw.returnJson(False, 'MySQL未启动,或正在启动中...!', []) conf = getConf() con = mw.readFile(conf) From c91f855eefd62b1550ccb706c99eb76993006f81 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 16:07:20 +0800 Subject: [PATCH 065/263] up --- plugins/php/lib/openssl_10.sh | 27 +++++++++++++++++++++++++++ plugins/php/versions/53/openssl.sh | 4 ++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 plugins/php/lib/openssl_10.sh diff --git a/plugins/php/lib/openssl_10.sh b/plugins/php/lib/openssl_10.sh new file mode 100644 index 000000000..90c1155e3 --- /dev/null +++ b/plugins/php/lib/openssl_10.sh @@ -0,0 +1,27 @@ +#!/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") + +# echo $rootPath + +SERVER_ROOT=$rootPath/lib +SOURCE_ROOT=$rootPath/source/lib + +if [ ! -d ${SERVER_ROOT}/openssl10 ];then + cd ${SOURCE_ROOT} + if [ ! -f ${SOURCE_ROOT}/openssl-1.0.2q.tar.gz ];then + wget https://github.com/midoks/mdserver-web/releases/download/init/openssl-1.0.2q.tar.gz -T 20 + fi + tar -zxf openssl-1.0.2q.tar.gz + cd openssl-1.0.2q + ./config --openssldir=${SERVER_ROOT}/openssl10 zlib-dynamic shared + make && make install +fi + + diff --git a/plugins/php/versions/53/openssl.sh b/plugins/php/versions/53/openssl.sh index 17950eef8..f1f581a5d 100755 --- a/plugins/php/versions/53/openssl.sh +++ b/plugins/php/versions/53/openssl.sh @@ -36,7 +36,7 @@ Install_lib() return fi - cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl_10.sh if [ ! -f "$extFile" ];then @@ -50,7 +50,7 @@ Install_lib() mv config0.m4 config.m4 fi - export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig + export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ --with-openssl From ba2eaa1bba6551fc6e517884b3121ad9b9bbf4e7 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 16:07:29 +0800 Subject: [PATCH 066/263] up --- plugins/pureftp/index.py | 1 + plugins/pureftp/js/ftp.js | 46 ++++++++++++++++++--------------------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/plugins/pureftp/index.py b/plugins/pureftp/index.py index bdce016f1..1a0fc0e29 100755 --- a/plugins/pureftp/index.py +++ b/plugins/pureftp/index.py @@ -214,6 +214,7 @@ def pftpAdd(username, password, path): if not os.path.exists(path): os.makedirs(path) if mw.isAppleSystem(): + # pass os.system('chown ' + user + '.staff ' + path) else: os.system('chown www.www ' + path) diff --git a/plugins/pureftp/js/ftp.js b/plugins/pureftp/js/ftp.js index 87d4c605c..42afdfc6e 100755 --- a/plugins/pureftp/js/ftp.js +++ b/plugins/pureftp/js/ftp.js @@ -24,7 +24,6 @@ function ftpPost(method,args,callback){ layer.msg(data.msg,{icon:0,time:2000,shade: [0.3, '#000']}); return; } - if(typeof(callback) == 'function'){ callback(data); } @@ -74,7 +73,7 @@ function ftpList(page, search){ content += '状态'; content += '根目录'; content += '备注'; - content += '操作(添加|端口)'; + content += '操作(添加|端口)'; content += ''; content += ''; @@ -111,35 +110,20 @@ function ftpList(page, search){ /** *添加FTP帐户 - * @param {Number} type 添加类型 */ -function addFtp(type) { - if (type == 1) { - var loadT = layer.load({shade: true,shadeClose: false}); - var data = $("#ftpAdd").serialize(); - ftpPost('add_ftp', data, function(data){ - if (data.data == 'ok'){ - layer.msg('添加成功!', {icon: 1,time:3000}); - } else { - layer.msg(rdata.data, {icon: 5,time:3000}); - } - ftpList(); - layer.close(loadT); - }); - return true; - } +function addFtp() { var data = ftpAsyncPost('get_www_dir'); var defaultPath = data.data; - var index = layer.open({ + var indexFtp = layer.open({ type: 1, - skin: 'demo-class', area: '500px', title: '添加FTP帐户', closeBtn: 2, shift: 5, shadeClose: false, - content: "
\ + btn: ['提交','关闭'], + content: "\
\ 用户名\
\ @@ -157,11 +141,23 @@ function addFtp(type) {
\ \
\ -
\ - \ - \ -
\
", + yes:function(index,layero){ + var loadT = layer.load({shade: true,shadeClose: false}); + var data = $("#ftpAdd").serialize(); + ftpPost('add_ftp', data, function(rdata){ + layer.close(loadT); + layer.close(indexFtp); + if (rdata.data == 'ok'){ + layer.msg('添加成功!', {icon: 1,time:3000}); + } else { + layer.msg(rdata.data, {icon: 5,time:3000}); + } + + setTimeout(function(){ftpList();},2000); + }); + return true; + }, }); $("#ftpUser").keyup(function(){ From 014873155b14be1274e46ece1b40ac5fb2d9b692 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 16:11:41 +0800 Subject: [PATCH 067/263] Update lib.sh --- scripts/lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib.sh b/scripts/lib.sh index 0e2718cc0..3b59396b3 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -307,7 +307,7 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y curl libcurl4-gnutls-dev #https://blog.csdn.net/qq_36228377/article/details/123154344 - ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/curl + # ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/curl apt install -y graphviz bison re2c flex apt install -y libsqlite3-dev From a0785be46ec0edea6ea27626ccdc18f8f9b4a354 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 16:19:43 +0800 Subject: [PATCH 068/263] =?UTF-8?q?php5x=E6=9B=B4=E6=96=B0openssl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/versions/52/openssl.sh | 4 ++-- plugins/php/versions/54/openssl.sh | 4 ++-- plugins/php/versions/55/openssl.sh | 4 ++-- plugins/php/versions/56/openssl.sh | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/php/versions/52/openssl.sh b/plugins/php/versions/52/openssl.sh index 17950eef8..f1f581a5d 100755 --- a/plugins/php/versions/52/openssl.sh +++ b/plugins/php/versions/52/openssl.sh @@ -36,7 +36,7 @@ Install_lib() return fi - cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl_10.sh if [ ! -f "$extFile" ];then @@ -50,7 +50,7 @@ Install_lib() mv config0.m4 config.m4 fi - export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig + export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ --with-openssl diff --git a/plugins/php/versions/54/openssl.sh b/plugins/php/versions/54/openssl.sh index 17950eef8..f1f581a5d 100755 --- a/plugins/php/versions/54/openssl.sh +++ b/plugins/php/versions/54/openssl.sh @@ -36,7 +36,7 @@ Install_lib() return fi - cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl_10.sh if [ ! -f "$extFile" ];then @@ -50,7 +50,7 @@ Install_lib() mv config0.m4 config.m4 fi - export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig + export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ --with-openssl diff --git a/plugins/php/versions/55/openssl.sh b/plugins/php/versions/55/openssl.sh index 17950eef8..f1f581a5d 100755 --- a/plugins/php/versions/55/openssl.sh +++ b/plugins/php/versions/55/openssl.sh @@ -36,7 +36,7 @@ Install_lib() return fi - cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl_10.sh if [ ! -f "$extFile" ];then @@ -50,7 +50,7 @@ Install_lib() mv config0.m4 config.m4 fi - export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig + export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ --with-openssl diff --git a/plugins/php/versions/56/openssl.sh b/plugins/php/versions/56/openssl.sh index 17950eef8..f1f581a5d 100755 --- a/plugins/php/versions/56/openssl.sh +++ b/plugins/php/versions/56/openssl.sh @@ -36,7 +36,7 @@ Install_lib() return fi - cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl_10.sh if [ ! -f "$extFile" ];then @@ -50,7 +50,7 @@ Install_lib() mv config0.m4 config.m4 fi - export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig + export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ --with-openssl From 71aa5ce58fe8e44a548c7476dd469eaa0a7128f6 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 16:44:54 +0800 Subject: [PATCH 069/263] Update all_test.sh --- plugins/php/all_test.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/plugins/php/all_test.sh b/plugins/php/all_test.sh index 0b4122dcf..3ddab91cd 100644 --- a/plugins/php/all_test.sh +++ b/plugins/php/all_test.sh @@ -5,23 +5,23 @@ DIR=$(cd "$(dirname "$0")"; pwd) # cd /www/server/mdserver-web/plugins/php && bash all_test.sh -# cd /www/server/mdserver-web/plugins/php/versions/74/ && bash openssl.sh install 74 +# cd /www/server/mdserver-web/plugins/php/versions/53/ && bash openssl.sh install 53 # cd /www/server/mdserver-web/plugins/php/versions/81/ && bash imagemagick.sh install 81 # cd /www/server/mdserver-web/plugins/php/versions/70/ && bash imagemagick.sh install 70 -# PHP_VER=52 -# 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=52 +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_LIST=(53 54 55 56 70 71 72 73 74 80 81) From b998234dec932c4a28e4a2e37c1c5550c47254fc Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 16:53:28 +0800 Subject: [PATCH 070/263] Update gd.sh --- plugins/php/versions/52/gd.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/php/versions/52/gd.sh b/plugins/php/versions/52/gd.sh index 4a05b6046..3a6e9fe50 100755 --- a/plugins/php/versions/52/gd.sh +++ b/plugins/php/versions/52/gd.sh @@ -54,8 +54,7 @@ Install_lib() --with-gd \ --with-jpeg-dir=/usr/lib \ --with-freetype-dir=${serverPath}/lib/freetype_old \ - --enable-gd-native-ttf \ - --enable-gd-jis-conv + --enable-gd-native-ttf make clean && make && make install && make clean From 9d8926d78e3b517244a62071456e3e88983026ed Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 17:40:19 +0800 Subject: [PATCH 071/263] Update pureftp.service.tpl --- plugins/pureftp/init.d/pureftp.service.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/pureftp/init.d/pureftp.service.tpl b/plugins/pureftp/init.d/pureftp.service.tpl index 227ccc451..7d632eae8 100644 --- a/plugins/pureftp/init.d/pureftp.service.tpl +++ b/plugins/pureftp/init.d/pureftp.service.tpl @@ -2,9 +2,11 @@ Description=Pure-FTPd is a fast, production-quality, standard-conformant FTP server After=network.target + + [Service] Type=forking -ExecStart={$SERVER_PATH}/pureftp/sbin/pure-ftpd {$SERVER_PATH}/pureftp/etc/pure-ftpd.conf --daemonize +ExecStart={$SERVER_PATH}/pureftp/sbin/pure-ftpd {$SERVER_PATH}/pureftp/etc/pure-ftpd.conf ExecStop=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -USR2 $MAINPID Restart=on-failure From f4178f4036c7e863954013456983f7ff17c0cba0 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 17:48:00 +0800 Subject: [PATCH 072/263] Update index.py --- plugins/pureftp/index.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/pureftp/index.py b/plugins/pureftp/index.py index 1a0fc0e29..d54b245b5 100755 --- a/plugins/pureftp/index.py +++ b/plugins/pureftp/index.py @@ -120,7 +120,9 @@ def initDreplace(): systemDir = '/lib/systemd/system' systemService = systemDir + '/pureftp.service' systemServiceTpl = getPluginDir() + '/init.d/pureftp.service.tpl' - if os.path.exists(systemDir) and not os.path.exists(systemService): + + if os.path.exists(systemDir): + # and not os.path.exists(systemService) se_content = mw.readFile(systemServiceTpl) se_content = se_content.replace('{$SERVER_PATH}', service_path) mw.writeFile(systemService, se_content) From fd67c6c8b05b55d178b1216c898254331258956a Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 18:07:19 +0800 Subject: [PATCH 073/263] =?UTF-8?q?=E6=B7=BB=E5=8A=A0ftp=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/pureftp/install.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/pureftp/install.sh b/plugins/pureftp/install.sh index 4c87fc1b4..7e08e4218 100755 --- a/plugins/pureftp/install.sh +++ b/plugins/pureftp/install.sh @@ -28,6 +28,15 @@ else OSNAME='unknow' fi + +if id ftp &> /dev/null ;then + echo "ftp UID is `id -u ftp`" + echo "ftp Shell is `grep "^ftp:" /etc/passwd |cut -d':' -f7 `" +else + groupadd ftp + useradd -g ftp -s /sbin/nologin ftp +fi + Install_pureftp() { # mkdir -p ${serverPath}/pureftp @@ -40,13 +49,10 @@ Install_pureftp() VER=$1 DOWNLOAD=https://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-${VER}.tar.gz - if [ ! -f $serverPath/source/pureftp/pure-ftpd-${VER}.tar.gz ];then wget --no-check-certificate -O $serverPath/source/pureftp/pure-ftpd-${VER}.tar.gz $DOWNLOAD fi - - #检测文件是否损坏. md5_ok=451879495ba61c1d7dcfca8dd231119f if [ -f $serverPath/source/pureftp/pure-ftpd-${VER}.tar.gz ];then From 67341711a8308f64b5c92f6c7ff09f8257ce0c66 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 18:10:44 +0800 Subject: [PATCH 074/263] Update install.sh --- plugins/pureftp/install.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/plugins/pureftp/install.sh b/plugins/pureftp/install.sh index 7e08e4218..b314cc93b 100755 --- a/plugins/pureftp/install.sh +++ b/plugins/pureftp/install.sh @@ -29,16 +29,18 @@ else fi -if id ftp &> /dev/null ;then - echo "ftp UID is `id -u ftp`" - echo "ftp Shell is `grep "^ftp:" /etc/passwd |cut -d':' -f7 `" -else - groupadd ftp - useradd -g ftp -s /sbin/nologin ftp -fi + Install_pureftp() { + if id ftp &> /dev/null ;then + echo "ftp UID is `id -u ftp`" + echo "ftp Shell is `grep "^ftp:" /etc/passwd |cut -d':' -f7 `" + else + groupadd ftp + useradd -g ftp -s /sbin/nologin ftp + fi + # mkdir -p ${serverPath}/pureftp mkdir -p ${serverPath}/source/pureftp @@ -98,6 +100,8 @@ Uninstall_pureftp() fi rm -rf ${serverPath}/pureftp + userdel ftp + groupdel ftp echo '卸载完成' > $install_tmp } From 2df3782cb5f4f4a2ace237e5a278ba30b0d1474f Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 20:30:19 +0800 Subject: [PATCH 075/263] Update install.sh --- plugins/mongodb/install.sh | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh index a44d66a73..ae52fff81 100755 --- a/plugins/mongodb/install.sh +++ b/plugins/mongodb/install.sh @@ -55,18 +55,26 @@ Install_app_mac() Install_Linux_Ubuntu() { ##################### Ubuntu start ##################### - if [ "$SYS_VERSION_ID" == "22" ]; then - echo "Not yet supported" - exit 1 - fi +if [ "$SYS_VERSION_ID" == "22" ]; then + echo "Not yet supported" + exit 1 +fi - wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - - sudo apt install gnupg - touch /etc/apt/sources.list.d/mongodb-org-4.4.list - lsb_release -dc +if [ -f /lib/systemd/system/mongod.service ];then + echo 'alreay exist!' + exit 0 +fi - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list +wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - +sudo apt install gnupg +touch /etc/apt/sources.list.d/mongodb-org-4.4.list +lsb_release -dc + +echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list + +apt update -y +apt install -y mongodb-org ##################### Ubuntu end ##################### } @@ -116,8 +124,6 @@ Install_app() if [ "macos" == "$OSNAME" ];then Install_app_mac - elif [ "ubuntu" == "$OSNAME" ] || [ "debian" == "$OSNAME" ] ;then - apt install -y mongodb else Install_app_linux fi @@ -128,7 +134,6 @@ Install_app() Uninstall_app() { - # apt remove mongodb -y rm -rf $serverPath/mongodb echo "Uninstall_mongodb" > $install_tmp } From e127e4e23220a14cb90cbbb118148f0dbfbb749d Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 21:19:19 +0800 Subject: [PATCH 076/263] ubtuntu mongodb --- plugins/mongodb/index.py | 2 +- plugins/mongodb/install.sh | 43 ++++++++++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/plugins/mongodb/index.py b/plugins/mongodb/index.py index 0305e1157..7056e0a5c 100755 --- a/plugins/mongodb/index.py +++ b/plugins/mongodb/index.py @@ -110,7 +110,7 @@ def start(): data = mw.execShell(file + ' start') if data[1] == '': return 'ok' - return 'fail' + return data[1] cmd = 'systemctl start mongod' if os.path.exists("/usr/lib/systemd/system/mongodb.service"): diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh index ae52fff81..fcabcbd90 100755 --- a/plugins/mongodb/install.sh +++ b/plugins/mongodb/install.sh @@ -66,22 +66,32 @@ if [ -f /lib/systemd/system/mongod.service ];then exit 0 fi -wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - +wget -qO - https://www.mongodb.org/static/pgp/server-${VERSION}.asc | sudo apt-key add - sudo apt install gnupg -touch /etc/apt/sources.list.d/mongodb-org-4.4.list +touch /etc/apt/sources.list.d/mongodb-org-${VERSION}.list lsb_release -dc -echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list +echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/${VERSION} multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-${VERSION}.list apt update -y apt install -y mongodb-org ##################### Ubuntu end ##################### } + +Uninstall_Linux_Ubuntu() +{ +apt purge -y mongodb-org* +apt autoremove -y +rm -r /var/log/mongodb +rm -r /var/lib/mongodb +} + + Install_Linux_Debian() { ##################### debian start ##################### - +echo 'mac' ##################### debian end ##################### } @@ -116,8 +126,6 @@ Install_app_linux() Install_app() { - pip3 install pymongo - echo '正在安装脚本文件...' > $install_tmp mkdir -p $serverPath/source mkdir -p $serverPath/mongodb @@ -132,8 +140,31 @@ Install_app() echo '安装完成' > $install_tmp } + + +Uninstall_app_linux() +{ +################## +if [ "$OSNAME" == "ubuntu" ];then + Uninstall_Linux_Ubuntu +elif [ "$OSNAME" == "debian" ];then + Unstall_Linux_Debian +elif [ "$OSNAME" == "centos" ];then + Install_Linux_CentOS +else + echo "ok" +fi +################## +} + Uninstall_app() { + if [ "macos" == "$OSNAME" ];then + echo 'mac' + else + Uninstall_app_linux + fi + rm -rf $serverPath/mongodb echo "Uninstall_mongodb" > $install_tmp } From 58897fe52b2de98a082bedb46da5913d2f04cd9d Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 21:52:10 +0800 Subject: [PATCH 077/263] Update install.sh --- plugins/mongodb/install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh index fcabcbd90..a98c95225 100755 --- a/plugins/mongodb/install.sh +++ b/plugins/mongodb/install.sh @@ -39,19 +39,15 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a Install_app_mac() { - if [ ! -f $serverPath/source/mongodb-macos-x86_64-${VERSION}.tgz ];then wget -O $serverPath/source/mongodb-macos-x86_64-${VERSION}.tgz https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-${VERSION}.tgz fi cd $serverPath/source && tar -zxvf mongodb-macos-x86_64-${VERSION}.tgz - cd mongodb-macos-x86_64-${VERSION} && mv ./* $serverPath/mongodb } - - Install_Linux_Ubuntu() { ##################### Ubuntu start ##################### @@ -81,6 +77,7 @@ apt install -y mongodb-org Uninstall_Linux_Ubuntu() { +systemctl stop mongod apt purge -y mongodb-org* apt autoremove -y rm -r /var/log/mongodb @@ -138,6 +135,10 @@ Install_app() echo "${VERSION}" > $serverPath/mongodb/version.pl echo '安装完成' > $install_tmp + + #初始化 + cd ${rootPath} && python3 ${rootPath}/plugins/mongodb/index.py start + cd ${rootPath} && python3 ${rootPath}/plugins/mongodb/index.py initd_install } From 57383b5a2b4f5a3178aa0fa36cd08598915c71e2 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 22:24:51 +0800 Subject: [PATCH 078/263] debian mongodb update --- plugins/mongodb/install.sh | 41 +++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh index a98c95225..6e71c4239 100755 --- a/plugins/mongodb/install.sh +++ b/plugins/mongodb/install.sh @@ -88,11 +88,50 @@ rm -r /var/lib/mongodb Install_Linux_Debian() { ##################### debian start ##################### -echo 'mac' +if [ "$SYS_VERSION_ID" -ge "11" ]; then + echo "Not yet supported" + exit 1 +fi + + +if [ -f /lib/systemd/system/mongod.service ];then + echo 'alreay exist!' + exit 0 +fi + +wget -qO - https://www.mongodb.org/static/pgp/server-${VERSION}.asc | sudo apt-key add - +apt install -y gnupg +wget -qO - https://www.mongodb.org/static/pgp/server-${VERSION}.asc | sudo apt-key add - + +echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/${VERSION} main" | sudo tee /etc/apt/sources.list.d/mongodb-org-${VERSION}.list + +apt update -y +apt install -y mongodb-org + + +echo "mongodb-org hold" | sudo dpkg --set-selections +echo "mongodb-org-server hold" | sudo dpkg --set-selections +echo "mongodb-org-shell hold" | sudo dpkg --set-selections +echo "mongodb-org-mongos hold" | sudo dpkg --set-selections +echo "mongodb-org-tools hold" | sudo dpkg --set-selections + ##################### debian end ##################### } + +Uninstall_Linux_Debian() +{ +systemctl stop mongod +apt purge -y mongodb-org* +apt autoremove -y +rm -r /var/log/mongodb +rm -r /var/lib/mongodb +} + + + + # https://repo.mongodb.org/yum/redhat/7/mongodb-org/5.0/x86_64/RPMS/mongodb-org-server-5.0.4-1.el7.x86_64.rpm Install_Linux_CentOS() { From 6200acc8f709e6149f1cb2116cb81a613a7a8f35 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 2 Jul 2022 23:47:33 +0800 Subject: [PATCH 079/263] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=AB=99=E7=82=B9?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/site_api.py | 10 ++++++++++ route/static/app/site.js | 23 +++++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index d5b770604..ef874b39c 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -789,6 +789,10 @@ class site_api: siteName = request.form.get('siteName', '') return self.getLogs(siteName) + def getErrorLogsApi(self): + siteName = request.form.get('siteName', '') + return self.getErrorLogs(siteName) + def getSitePhpVersionApi(self): siteName = request.form.get('siteName', '') return self.getSitePhpVersion(siteName) @@ -1737,6 +1741,12 @@ location ~* ^{from}(.*)$ { return mw.returnJson(False, '日志为空') return mw.returnJson(True, mw.getNumLines(logPath, 100)) + def getErrorLogs(self, siteName): + logPath = mw.getLogsDir() + '/' + siteName + '.error.log' + if not os.path.exists(logPath): + return mw.returnJson(False, '日志为空') + return mw.returnJson(True, mw.getNumLines(logPath, 100)) + # 取日志状态 def getLogsStatus(self, siteName): filename = self.getHostConf(siteName) diff --git a/route/static/app/site.js b/route/static/app/site.js index ff68dec97..325bf6f9e 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -1010,7 +1010,9 @@ function webEdit(id,website,endTime,addtime){ +"

重定向

" +"

反向代理

" +"

防盗链

" - +"

响应日志

"; + +"

响应日志

" + +"

错误日志

"; + layer.open({ type: 1, area: '640px', @@ -1053,7 +1055,24 @@ function webEdit(id,website,endTime,addtime){ function getSiteLogs(siteName){ var loadT = layer.msg('正在处理,请稍候...',{icon:16,time:0,shade: [0.3, '#000']}); $.post('/site/get_logs',{siteName:siteName},function(logs){ - console.log(logs); + // console.log(logs); + layer.close(loadT); + if(logs.status !== true){ + logs.msg = ''; + } + if (logs.msg == '') logs.msg = '当前没有日志.'; + var phpCon = ''; + $("#webedit-con").html(phpCon); + var ob = document.getElementById('error_log'); + ob.scrollTop = ob.scrollHeight; + },'json'); +} + +//取网站错误日志 +function getSiteErrorLogs(siteName){ + var loadT = layer.msg('正在处理,请稍候...',{icon:16,time:0,shade: [0.3, '#000']}); + $.post('/site/get_error_logs',{siteName:siteName},function(logs){ + // console.log(logs); layer.close(loadT); if(logs.status !== true){ logs.msg = ''; From 1191ce33614ed5b24e36eedb3808f2e2d8beb603 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 00:15:38 +0800 Subject: [PATCH 080/263] Update lib.sh --- scripts/lib.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/lib.sh b/scripts/lib.sh index 3b59396b3..635eb9791 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -308,6 +308,10 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y curl libcurl4-gnutls-dev #https://blog.csdn.net/qq_36228377/article/details/123154344 # ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/curl + if [ ! -d /usr/include/curl ];then + ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/curl + fi + apt install -y graphviz bison re2c flex apt install -y libsqlite3-dev From 575ba07f9741833ca451a618a17802a69b8a1ac8 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 00:16:34 +0800 Subject: [PATCH 081/263] Update lib.sh --- scripts/lib.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/lib.sh b/scripts/lib.sh index 635eb9791..b01a97b9c 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -273,6 +273,7 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y net-tools apt install -y python3-dev apt install -y autoconf + apt install -y gcc apt install -y libffi-dev apt install -y cmake automake make @@ -285,7 +286,7 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y libpcre3 libpcre3-dev apt install -y openssl apt install -y libssl-dev - apt install -y libcurl4-openssl-dev + apt install -y libmemcached-dev apt install -y libsasl2-dev apt install -y imagemagick libmagickwand-dev @@ -300,11 +301,11 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y libfreetype6-dev apt install -y libevent-dev libncurses5-dev libldap2-dev apt install -y libzip-dev - apt install -y libicu-dev - apt install -y gcc build-essential + apt install -y build-essential + apt install -y libcurl4-openssl-dev apt install -y curl libcurl4-gnutls-dev #https://blog.csdn.net/qq_36228377/article/details/123154344 # ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/curl From 2832152d943a8d634508b1a74928f7f163b294d9 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 00:47:45 +0800 Subject: [PATCH 082/263] =?UTF-8?q?php=E7=8E=AF=E5=A2=83=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/site_api.py | 4 ++++ plugins/php/conf/enable-php.conf | 1 + 2 files changed, 5 insertions(+) diff --git a/class/core/site_api.py b/class/core/site_api.py index ef874b39c..dcf46424e 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -2036,6 +2036,10 @@ location ~* ^{from}(.*)$ { rewrite_content = ''' location /{ + if ($PHP_ENV != "1"){ + break; + } + if (!-e $request_filename) { rewrite ^(.*)$ /index.php/$1 last; break; diff --git a/plugins/php/conf/enable-php.conf b/plugins/php/conf/enable-php.conf index d9712e0e3..2046ac2cb 100644 --- a/plugins/php/conf/enable-php.conf +++ b/plugins/php/conf/enable-php.conf @@ -1,3 +1,4 @@ +set $PHP_ENV 1; location ~ [^/]\.php(/|$) { try_files $uri =404; From d06648ff474d0062a19da0ff660ede3703037dbd Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 10:50:04 +0800 Subject: [PATCH 083/263] up --- plugins/php/conf/php-fpm-52.conf | 4 ++-- plugins/php/versions/52/intl.sh | 10 ++++++---- scripts/lib.sh | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/plugins/php/conf/php-fpm-52.conf b/plugins/php/conf/php-fpm-52.conf index ffc418981..94ddd2aba 100644 --- a/plugins/php/conf/php-fpm-52.conf +++ b/plugins/php/conf/php-fpm-52.conf @@ -6,10 +6,10 @@
Pid file - /www/server/php/52/logs/php-fpm.pid + /www/server/php/52/var/logs/php-fpm.pid Error log file - /www/server/php/52/logs/php-fpm.log + /www/server/php/52/var/logs/php-fpm.log Log level notice diff --git a/plugins/php/versions/52/intl.sh b/plugins/php/versions/52/intl.sh index d45267fd6..d2d329a96 100755 --- a/plugins/php/versions/52/intl.sh +++ b/plugins/php/versions/52/intl.sh @@ -35,19 +35,21 @@ Install_lib() return fi - + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh + if [ ! -f "$extFile" ];then php_lib=$sourcePath/php_lib mkdir -p $php_lib - + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz cd ${LIBNAME}-${LIBV} $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean + ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-icu-dir=${serverPath}/lib/icu + make clean && make && make install && make clean fi diff --git a/scripts/lib.sh b/scripts/lib.sh index b01a97b9c..27acceac7 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -289,7 +289,8 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y libmemcached-dev apt install -y libsasl2-dev - apt install -y imagemagick libmagickwand-dev + apt install -y imagemagick + apt install -y libmagickwand-dev apt install -y libxml2 libxml2-dev libbz2-dev libmcrypt-dev libpspell-dev librecode-dev apt install -y libgmp-dev libgmp3-dev libreadline-dev libxpm-dev From 2663fd7a991351a08034a64eb4ebf961f1b30216 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 11:18:55 +0800 Subject: [PATCH 084/263] =?UTF-8?q?php502=E5=8A=9F=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task.py | 56 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/task.py b/task.py index 67f486cd6..01d6745ff 100755 --- a/task.py +++ b/task.py @@ -432,34 +432,40 @@ def startPHPVersion(version): def checkPHPVersion(version): try: url = 'http://127.0.0.1/phpfpm_status_' + version - result = mw.httpGet(url) - # print(version,result) - # 检查openresty - if result.find('Bad Gateway') != -1: - return False - if result.find('HTTP Error 404: Not Found') != -1: - return False + result = mw.httpGet(url, 1) + if result.find('timed out'): + raise + except Exception as e: + url = 'http://' + mw.getLocalIp() + '/phpfpm_status_' + version + result = mw.httpGet(url, 1) + else: + result = 'Bad Gateway' - # 检查Web服务是否启动 - if result.find('Connection refused') != -1: - global isTask - if os.path.exists(isTask): - isStatus = mw.readFile(isTask) - if isStatus == 'True': - return True + # print(version,result) + # 检查openresty + if result.find('Bad Gateway') != -1: + return False + if result.find('HTTP Error 404: Not Found') != -1: + return False - # systemd - systemd = '/lib/systemd/system/openresty.service' - if os.path.exists(systemd): - execShell('systemctl reload openresty') + # 检查Web服务是否启动 + if result.find('Connection refused') != -1: + global isTask + if os.path.exists(isTask): + isStatus = mw.readFile(isTask) + if isStatus == 'True': return True - # initd - initd = '/etc/init.d/openresty' - if os.path.exists(initd): - os.system(initd + ' reload') - return True - except: - return True + + # systemd + systemd = '/lib/systemd/system/openresty.service' + if os.path.exists(systemd): + execShell('systemctl reload openresty') + return True + # initd + initd = '/etc/init.d/openresty' + if os.path.exists(initd): + os.system(initd + ' reload') + return True # --------------------------------------PHP监控 end--------------------------------------------- # From eda1eb16ff587f5169ce6a8731b64f854cea8e7d Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 11:31:34 +0800 Subject: [PATCH 085/263] Update index.py --- plugins/mongodb/index.py | 92 +++++++--------------------------------- 1 file changed, 16 insertions(+), 76 deletions(-) diff --git a/plugins/mongodb/index.py b/plugins/mongodb/index.py index 7056e0a5c..26fc280c7 100755 --- a/plugins/mongodb/index.py +++ b/plugins/mongodb/index.py @@ -104,80 +104,41 @@ def initDreplace(): return file_bin -def start(): +def mgOp(method): + file = initDreplace() if mw.isAppleSystem(): - file = initDreplace() - data = mw.execShell(file + ' start') + data = mw.execShell(file + ' ' + method) if data[1] == '': return 'ok' return data[1] - cmd = 'systemctl start mongod' + cmd = 'systemctl ' + method + ' mongod' if os.path.exists("/usr/lib/systemd/system/mongodb.service"): - cmd = 'systemctl start mongodb' + cmd = 'systemctl ' + start + ' mongodb' data = mw.execShell(cmd) if data[1] == '': return 'ok' - return 'fail' + return data[1] + + +def start(): + return mgOp('start') def stop(): - if mw.isAppleSystem(): - file = initDreplace() - data = mw.execShell(file + ' stop') - if data[1] == '': - return 'ok' - return 'fail' - - cmd = 'systemctl stop mongod' - if os.path.exists("/usr/lib/systemd/system/mongodb.service"): - cmd = 'systemctl stop mongodb' - - data = mw.execShell(cmd) - if data[1] == '': - return 'ok' - return 'fail' + return mgOp('stop') def reload(): - if os.path.exists("/tmp/mongodb-27017.sock"): - mw.execShell('rm -rf ' + "/tmp/mongodb-27017.sock") - if mw.isAppleSystem(): - file = initDreplace() - data = mw.execShell(file + ' reload') - if data[1] == '': - return 'ok' - return 'fail' - - cmd = 'systemctl reload mongod' - if os.path.exists("/usr/lib/systemd/system/mongodb.service"): - cmd = 'systemctl reload mongodb' - - data = mw.execShell(cmd) - if data[1] == '': - return 'ok' - return 'fail' + return mgOp('reload') def restart(): if os.path.exists("/tmp/mongodb-27017.sock"): mw.execShell('rm -rf ' + "/tmp/mongodb-27017.sock") - if mw.isAppleSystem(): - file = initDreplace() - data = mw.execShell(file + ' reload') - if data[1] == '': - return 'ok' - return 'fail' - cmd = 'systemctl reload mongod' - if os.path.exists("/usr/lib/systemd/system/mongodb.service"): - cmd = 'systemctl reload mongodb' - - data = mw.execShell(cmd) - if data[1] == '': - return 'ok' - return 'fail' + return mgOp('restart') def runInfo(): @@ -218,15 +179,8 @@ def runInfo(): def initdStatus(): - if not app_debug: - if mw.isAppleSystem(): - return "Apple Computer does not support" - if mw.isAppleSystem(): - initd_bin = getInitDFile() - if os.path.exists(initd_bin): - return 'ok' - return 'fail' + return "Apple Computer does not support" shell_cmd = 'systemctl status mongod | grep loaded | grep "enabled;"' @@ -240,17 +194,8 @@ def initdStatus(): def initdInstall(): - import shutil - if not app_debug: - if mw.isAppleSystem(): - return "Apple Computer does not support" - if mw.isAppleSystem(): - source_bin = initDreplace() - initd_bin = getInitDFile() - shutil.copyfile(source_bin, initd_bin) - mw.execShell('chmod +x ' + initd_bin) - mw.execShell('chkconfig --add ' + getPluginName()) + return "Apple Computer does not support" if os.path.exists("/usr/lib/systemd/system/mongodb.service"): mw.execShell('systemctl enable mongodb') @@ -260,13 +205,8 @@ def initdInstall(): def initdUinstall(): - if not app_debug: - if mw.isAppleSystem(): - return "Apple Computer does not support" if mw.isAppleSystem(): - mw.execShell('chkconfig --del ' + getPluginName()) - initd_bin = getInitDFile() - os.remove(initd_bin) + return "Apple Computer does not support" if os.path.exists("/usr/lib/systemd/system/mongodb.service"): mw.execShell('systemctl disable mongodb') From f42d1b9d26a7545f636b11575aca83d09c11c676 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 11:34:12 +0800 Subject: [PATCH 086/263] Update debug.sh --- scripts/quick/debug.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/quick/debug.sh b/scripts/quick/debug.sh index d8855d5ec..a23015b50 100755 --- a/scripts/quick/debug.sh +++ b/scripts/quick/debug.sh @@ -24,7 +24,7 @@ fi -PHP_VER_LIST=(53 54 55 56 70 71 72 73 74 80 81) +PHP_VER_LIST=(52 53 54 55 56 70 71 72 73 74 80 81) # PHP_VER_LIST=(81) for PHP_VER in ${PHP_VER_LIST[@]}; do echo "php${PHP_VER} -- start" From 0f57cb7357b70f3d5062a507e498b2ea836598f3 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 11:50:07 +0800 Subject: [PATCH 087/263] up --- plugins/php/all_test.sh | 6 +++++- plugins/php/conf/php-fpm-52.conf | 4 ++-- plugins/php/index.py | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/php/all_test.sh b/plugins/php/all_test.sh index 3ddab91cd..04d5f4538 100644 --- a/plugins/php/all_test.sh +++ b/plugins/php/all_test.sh @@ -3,9 +3,13 @@ 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/scripts/quick && bash app.sh # cd /www/server/mdserver-web/plugins/php && bash all_test.sh -# cd /www/server/mdserver-web/plugins/php/versions/53/ && bash openssl.sh install 53 +# cd /www/server/mdserver-web/plugins/php/versions/52/ && bash gd.sh install 52 + +# cd /www/server/mdserver-web/plugins/php/versions/52/ && bash openssl.sh install 52 # cd /www/server/mdserver-web/plugins/php/versions/81/ && bash imagemagick.sh install 81 # cd /www/server/mdserver-web/plugins/php/versions/70/ && bash imagemagick.sh install 70 diff --git a/plugins/php/conf/php-fpm-52.conf b/plugins/php/conf/php-fpm-52.conf index 94ddd2aba..1fcb8001c 100644 --- a/plugins/php/conf/php-fpm-52.conf +++ b/plugins/php/conf/php-fpm-52.conf @@ -6,10 +6,10 @@
Pid file - /www/server/php/52/var/logs/php-fpm.pid + /www/server/php/52/var/log/php-fpm.pid Error log file - /www/server/php/52/var/logs/php-fpm.log + /www/server/php/52/var/log/php-fpm.log Log level notice diff --git a/plugins/php/index.py b/plugins/php/index.py index 069230fdd..1e7c9a739 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -185,6 +185,7 @@ def phpFpmReplace(version): mw.writeFile(desc_php_fpm, content) else: if version == '52': + os.makedirs(getServerDir() + '/php/' + version + '/var/log') tpl_php_fpm = tpl_php_fpm = getPluginDir() + '/conf/php-fpm-52.conf' content = mw.readFile(tpl_php_fpm) mw.writeFile(desc_php_fpm, content) From be4570e115d83b032b1e0b1d1cfde2f694944218 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 12:11:09 +0800 Subject: [PATCH 088/263] Update index.py --- plugins/php/index.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index 1e7c9a739..27b79f3ab 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -275,7 +275,7 @@ def phpOp(version, method): data = mw.execShell('systemctl ' + method + ' php' + version) if data[1] == '': return 'ok' - return 'fail' + return data[1] data = mw.execShell(file + ' ' + method) if data[1] == '': @@ -556,13 +556,13 @@ def getFpmStatus(version): try: url = 'http://' + mw.getHostAddr() + '/phpfpm_status_' + version + '?json' - result = mw.httpGet(url) + result = mw.httpGet(url, 1) data = json.loads(result) fTime = time.localtime(int(data['start time'])) data['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) except Exception as e: url = 'http://127.0.0.1/phpfpm_status_' + version + '?json' - result = mw.httpGet(url) + result = mw.httpGet(url, 1) data = json.loads(result) fTime = time.localtime(int(data['start time'])) data['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) From c347e1b909d38cc97cca7badf03efdb825c28563 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 12:16:43 +0800 Subject: [PATCH 089/263] update --- plugins/php/index.py | 16 +++++++++------- plugins/php/init.d/php52.tpl | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index 27b79f3ab..b5fb5c676 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -446,21 +446,23 @@ def setMaxTime(version): def setMaxSize(version): args = getArgs() - if not 'max' in args: - return 'missing time args!' - max = args['max'] - if int(max) < 2: + data = checkArgs(args, ['max']) + if not data[0]: + return data[1] + + maxVal = args['max'] + if int(maxVal) < 2: return mw.returnJson(False, '上传大小限制不能小于2MB!') path = getServerDir() + '/' + version + '/etc/php.ini' conf = mw.readFile(path) rep = u"\nupload_max_filesize\s*=\s*[0-9]+M" - conf = re.sub(rep, u'\nupload_max_filesize = ' + max + 'M', conf) + conf = re.sub(rep, u'\nupload_max_filesize = ' + maxVal + 'M', conf) rep = u"\npost_max_size\s*=\s*[0-9]+M" - conf = re.sub(rep, u'\npost_max_size = ' + max + 'M', conf) + conf = re.sub(rep, u'\npost_max_size = ' + maxVal + 'M', conf) mw.writeFile(path, conf) - msg = mw.getInfo('设置PHP-{1}最大上传大小为[{2}MB]!', (version, max,)) + msg = mw.getInfo('设置PHP-{1}最大上传大小为[{2}MB]!', (version, maxVal,)) mw.writeLog('插件管理[PHP]', msg) return mw.returnJson(True, '设置成功!') diff --git a/plugins/php/init.d/php52.tpl b/plugins/php/init.d/php52.tpl index 2daa4a78d..49b94dba4 100644 --- a/plugins/php/init.d/php52.tpl +++ b/plugins/php/init.d/php52.tpl @@ -2,7 +2,7 @@ php_fpm_BIN=/www/server/php/52/bin/php-cgi php_fpm_CONF=/www/server/php/52/etc/php-fpm.conf -php_fpm_PID=/www/server/php/52/logs/php-fpm.pid +php_fpm_PID=/www/server/php/52//var/log/php-fpm.pid php_opts="--fpm-config $php_fpm_CONF" From 0856e4e53317e435b96a2d1dbe998a0d06b9bd53 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 12:30:42 +0800 Subject: [PATCH 090/263] up --- plugins/php/all_test.sh | 2 +- plugins/php/index.py | 1 - plugins/php/versions/52/install.sh | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/php/all_test.sh b/plugins/php/all_test.sh index 04d5f4538..8549810fd 100644 --- a/plugins/php/all_test.sh +++ b/plugins/php/all_test.sh @@ -4,7 +4,7 @@ DIR=$(cd "$(dirname "$0")"; pwd) -# cd /www/server/mdserver-web/scripts/quick && bash app.sh +# cd /www/server/mdserver-web/scripts/quick && bash debug.sh # cd /www/server/mdserver-web/plugins/php && bash all_test.sh # cd /www/server/mdserver-web/plugins/php/versions/52/ && bash gd.sh install 52 diff --git a/plugins/php/index.py b/plugins/php/index.py index b5fb5c676..010114d3e 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -185,7 +185,6 @@ def phpFpmReplace(version): mw.writeFile(desc_php_fpm, content) else: if version == '52': - os.makedirs(getServerDir() + '/php/' + version + '/var/log') tpl_php_fpm = tpl_php_fpm = getPluginDir() + '/conf/php-fpm-52.conf' content = mw.readFile(tpl_php_fpm) mw.writeFile(desc_php_fpm, content) diff --git a/plugins/php/versions/52/install.sh b/plugins/php/versions/52/install.sh index c130e43e9..30378f0c4 100755 --- a/plugins/php/versions/52/install.sh +++ b/plugins/php/versions/52/install.sh @@ -161,6 +161,9 @@ if [ ! -d $serverPath/php/${PHP_VER}/lib/php/extensions/no-debug-non-zts-2006061 mkdir -p $serverPath/php/${PHP_VER}/lib/php/extensions/no-debug-non-zts-20060613 fi + +mkdir -p $serverPath/php/${PHP_VER}/var/log + #------------------------ install end ------------------------------------# } From 4e339fdd9e2abcf6fc572e128970ed27d769f823 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 12:42:24 +0800 Subject: [PATCH 091/263] Update php-fpm-52.conf --- plugins/php/conf/php-fpm-52.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/php/conf/php-fpm-52.conf b/plugins/php/conf/php-fpm-52.conf index 1fcb8001c..6552b797e 100644 --- a/plugins/php/conf/php-fpm-52.conf +++ b/plugins/php/conf/php-fpm-52.conf @@ -107,7 +107,7 @@ 0s The log file for slow requests - logs/slow.log + var/log/www-slow.log Set open file desc rlimit 1024 From 574b1e62b99a6f55d3efd6c74d303eae3c9264a1 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 12:52:54 +0800 Subject: [PATCH 092/263] up --- plugins/php/conf/php-fpm-52.conf | 2 +- plugins/php/index.py | 4 - plugins/php/init.d/php52.tpl | 139 ----------------------------- plugins/php/versions/52/install.sh | 4 +- 4 files changed, 4 insertions(+), 145 deletions(-) delete mode 100644 plugins/php/init.d/php52.tpl diff --git a/plugins/php/conf/php-fpm-52.conf b/plugins/php/conf/php-fpm-52.conf index 6552b797e..444c2c816 100644 --- a/plugins/php/conf/php-fpm-52.conf +++ b/plugins/php/conf/php-fpm-52.conf @@ -6,7 +6,7 @@
Pid file - /www/server/php/52/var/log/php-fpm.pid + /www/server/php/52/var/run/php-fpm.pid Error log file /www/server/php/52/var/log/php-fpm.log diff --git a/plugins/php/index.py b/plugins/php/index.py index 010114d3e..e6ee08b24 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -228,10 +228,6 @@ def initReplace(version): file_bin = initD_path + '/php' + version if not os.path.exists(file_bin): file_tpl = getPluginDir() + '/init.d/php.tpl' - - if version == '52': - file_tpl = getPluginDir() + '/init.d/php52.tpl' - content = mw.readFile(file_tpl) content = contentReplace(content, version) diff --git a/plugins/php/init.d/php52.tpl b/plugins/php/init.d/php52.tpl deleted file mode 100644 index 49b94dba4..000000000 --- a/plugins/php/init.d/php52.tpl +++ /dev/null @@ -1,139 +0,0 @@ -#! /bin/sh - -php_fpm_BIN=/www/server/php/52/bin/php-cgi -php_fpm_CONF=/www/server/php/52/etc/php-fpm.conf -php_fpm_PID=/www/server/php/52//var/log/php-fpm.pid - - -php_opts="--fpm-config $php_fpm_CONF" - - -wait_for_pid () { - try=0 - - while test $try -lt 35 ; do - - case "$1" in - 'created') - if [ -f "$2" ] ; then - try='' - break - fi - ;; - - 'removed') - if [ ! -f "$2" ] ; then - try='' - break - fi - ;; - esac - - echo -n . - try=`expr $try + 1` - sleep 1 - - done - -} - -case "$1" in - start) - echo -n "Starting php_fpm " - - $php_fpm_BIN --fpm $php_opts - - if [ "$?" != 0 ] ; then - echo " failed" - exit 1 - fi - - wait_for_pid created $php_fpm_PID - - if [ -n "$try" ] ; then - echo " failed" - exit 1 - else - echo " done" - fi - ;; - - stop) - echo -n "Shutting down php_fpm " - - if [ ! -r $php_fpm_PID ] ; then - echo "warning, no pid file found - php-fpm is not running ?" - exit 1 - fi - - kill -TERM `cat $php_fpm_PID` - - wait_for_pid removed $php_fpm_PID - - if [ -n "$try" ] ; then - echo " failed" - exit 1 - else - echo " done" - fi - ;; - - quit) - echo -n "Gracefully shutting down php_fpm " - - if [ ! -r $php_fpm_PID ] ; then - echo "warning, no pid file found - php-fpm is not running ?" - exit 1 - fi - - kill -QUIT `cat $php_fpm_PID` - - wait_for_pid removed $php_fpm_PID - - if [ -n "$try" ] ; then - echo " failed" - exit 1 - else - echo " done" - fi - ;; - - restart) - $0 stop - $0 start - ;; - - reload) - - echo -n "Reload service php-fpm " - - if [ ! -r $php_fpm_PID ] ; then - echo "warning, no pid file found - php-fpm is not running ?" - exit 1 - fi - - kill -USR2 `cat $php_fpm_PID` - - echo " done" - ;; - - logrotate) - - echo -n "Re-opening php-fpm log file " - - if [ ! -r $php_fpm_PID ] ; then - echo "warning, no pid file found - php-fpm is not running ?" - exit 1 - fi - - kill -USR1 `cat $php_fpm_PID` - - echo " done" - ;; - - *) - echo "Usage: $0 {start|stop|quit|restart|reload|logrotate}" - exit 1 - ;; - -esac diff --git a/plugins/php/versions/52/install.sh b/plugins/php/versions/52/install.sh index 30378f0c4..fb957937e 100755 --- a/plugins/php/versions/52/install.sh +++ b/plugins/php/versions/52/install.sh @@ -161,8 +161,10 @@ if [ ! -d $serverPath/php/${PHP_VER}/lib/php/extensions/no-debug-non-zts-2006061 mkdir -p $serverPath/php/${PHP_VER}/lib/php/extensions/no-debug-non-zts-20060613 fi - +# ps -ef|grep php/52 |grep -v grep |awk '{print $2}'|xargs kill +# /www/server/php/init.d/php52 start mkdir -p $serverPath/php/${PHP_VER}/var/log +mkdir -p $serverPath/php/${PHP_VER}/var/run #------------------------ install end ------------------------------------# } From 5d652391908e48fa3e8badd56bd47cbaa83794fa Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 13:52:34 +0800 Subject: [PATCH 093/263] Revert "up" This reverts commit 574b1e62b99a6f55d3efd6c74d303eae3c9264a1. --- plugins/php/conf/php-fpm-52.conf | 2 +- plugins/php/index.py | 4 + plugins/php/init.d/php52.tpl | 139 +++++++++++++++++++++++++++++ plugins/php/versions/52/install.sh | 4 +- 4 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 plugins/php/init.d/php52.tpl diff --git a/plugins/php/conf/php-fpm-52.conf b/plugins/php/conf/php-fpm-52.conf index 444c2c816..6552b797e 100644 --- a/plugins/php/conf/php-fpm-52.conf +++ b/plugins/php/conf/php-fpm-52.conf @@ -6,7 +6,7 @@
Pid file - /www/server/php/52/var/run/php-fpm.pid + /www/server/php/52/var/log/php-fpm.pid Error log file /www/server/php/52/var/log/php-fpm.log diff --git a/plugins/php/index.py b/plugins/php/index.py index e6ee08b24..010114d3e 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -228,6 +228,10 @@ def initReplace(version): file_bin = initD_path + '/php' + version if not os.path.exists(file_bin): file_tpl = getPluginDir() + '/init.d/php.tpl' + + if version == '52': + file_tpl = getPluginDir() + '/init.d/php52.tpl' + content = mw.readFile(file_tpl) content = contentReplace(content, version) diff --git a/plugins/php/init.d/php52.tpl b/plugins/php/init.d/php52.tpl new file mode 100644 index 000000000..49b94dba4 --- /dev/null +++ b/plugins/php/init.d/php52.tpl @@ -0,0 +1,139 @@ +#! /bin/sh + +php_fpm_BIN=/www/server/php/52/bin/php-cgi +php_fpm_CONF=/www/server/php/52/etc/php-fpm.conf +php_fpm_PID=/www/server/php/52//var/log/php-fpm.pid + + +php_opts="--fpm-config $php_fpm_CONF" + + +wait_for_pid () { + try=0 + + while test $try -lt 35 ; do + + case "$1" in + 'created') + if [ -f "$2" ] ; then + try='' + break + fi + ;; + + 'removed') + if [ ! -f "$2" ] ; then + try='' + break + fi + ;; + esac + + echo -n . + try=`expr $try + 1` + sleep 1 + + done + +} + +case "$1" in + start) + echo -n "Starting php_fpm " + + $php_fpm_BIN --fpm $php_opts + + if [ "$?" != 0 ] ; then + echo " failed" + exit 1 + fi + + wait_for_pid created $php_fpm_PID + + if [ -n "$try" ] ; then + echo " failed" + exit 1 + else + echo " done" + fi + ;; + + stop) + echo -n "Shutting down php_fpm " + + if [ ! -r $php_fpm_PID ] ; then + echo "warning, no pid file found - php-fpm is not running ?" + exit 1 + fi + + kill -TERM `cat $php_fpm_PID` + + wait_for_pid removed $php_fpm_PID + + if [ -n "$try" ] ; then + echo " failed" + exit 1 + else + echo " done" + fi + ;; + + quit) + echo -n "Gracefully shutting down php_fpm " + + if [ ! -r $php_fpm_PID ] ; then + echo "warning, no pid file found - php-fpm is not running ?" + exit 1 + fi + + kill -QUIT `cat $php_fpm_PID` + + wait_for_pid removed $php_fpm_PID + + if [ -n "$try" ] ; then + echo " failed" + exit 1 + else + echo " done" + fi + ;; + + restart) + $0 stop + $0 start + ;; + + reload) + + echo -n "Reload service php-fpm " + + if [ ! -r $php_fpm_PID ] ; then + echo "warning, no pid file found - php-fpm is not running ?" + exit 1 + fi + + kill -USR2 `cat $php_fpm_PID` + + echo " done" + ;; + + logrotate) + + echo -n "Re-opening php-fpm log file " + + if [ ! -r $php_fpm_PID ] ; then + echo "warning, no pid file found - php-fpm is not running ?" + exit 1 + fi + + kill -USR1 `cat $php_fpm_PID` + + echo " done" + ;; + + *) + echo "Usage: $0 {start|stop|quit|restart|reload|logrotate}" + exit 1 + ;; + +esac diff --git a/plugins/php/versions/52/install.sh b/plugins/php/versions/52/install.sh index fb957937e..30378f0c4 100755 --- a/plugins/php/versions/52/install.sh +++ b/plugins/php/versions/52/install.sh @@ -161,10 +161,8 @@ if [ ! -d $serverPath/php/${PHP_VER}/lib/php/extensions/no-debug-non-zts-2006061 mkdir -p $serverPath/php/${PHP_VER}/lib/php/extensions/no-debug-non-zts-20060613 fi -# ps -ef|grep php/52 |grep -v grep |awk '{print $2}'|xargs kill -# /www/server/php/init.d/php52 start + mkdir -p $serverPath/php/${PHP_VER}/var/log -mkdir -p $serverPath/php/${PHP_VER}/var/run #------------------------ install end ------------------------------------# } From 718a96821abb64341ab4acb2bf24f4707911ebdc Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 13:54:23 +0800 Subject: [PATCH 094/263] up --- plugins/php/conf/php-fpm-52.conf | 2 +- plugins/php/init.d/php52.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/php/conf/php-fpm-52.conf b/plugins/php/conf/php-fpm-52.conf index 6552b797e..444c2c816 100644 --- a/plugins/php/conf/php-fpm-52.conf +++ b/plugins/php/conf/php-fpm-52.conf @@ -6,7 +6,7 @@
Pid file - /www/server/php/52/var/log/php-fpm.pid + /www/server/php/52/var/run/php-fpm.pid Error log file /www/server/php/52/var/log/php-fpm.log diff --git a/plugins/php/init.d/php52.tpl b/plugins/php/init.d/php52.tpl index 49b94dba4..73f96406b 100644 --- a/plugins/php/init.d/php52.tpl +++ b/plugins/php/init.d/php52.tpl @@ -2,7 +2,7 @@ php_fpm_BIN=/www/server/php/52/bin/php-cgi php_fpm_CONF=/www/server/php/52/etc/php-fpm.conf -php_fpm_PID=/www/server/php/52//var/log/php-fpm.pid +php_fpm_PID=/www/server/php/52/var/run/php-fpm.pid php_opts="--fpm-config $php_fpm_CONF" From 9d33716f5505ad1e756b8beb429e74bc91701e99 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 14:04:02 +0800 Subject: [PATCH 095/263] Update gd.sh --- plugins/php/versions/52/gd.sh | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/plugins/php/versions/52/gd.sh b/plugins/php/versions/52/gd.sh index 3a6e9fe50..7931ddc00 100755 --- a/plugins/php/versions/52/gd.sh +++ b/plugins/php/versions/52/gd.sh @@ -27,6 +27,26 @@ else BAK='' fi + +sysName=`uname` +echo "use system: ${sysName}" + +if [ ${sysName} == "Darwin" ]; then + OSNAME='macos' +elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then + OSNAME='centos' +elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then + OSNAME='fedora' +elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then + OSNAME='debian' +elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then + OSNAME='ubuntu' +elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then + OSNAME='raspbian' +else + OSNAME='unknow' +fi + Install_lib() { @@ -36,9 +56,12 @@ Install_lib() return fi - ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so - ln -s /usr/lib64/libpng.so /usr/lib/ - cp -frp /usr/lib64/libldap* /usr/lib/ + + if [ "$OSNAME" == "debian" ] && [ "$OSNAME" == "ubuntu" ];then + ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so + ln -s /usr/lib64/libpng.so /usr/lib/ + cp -frp /usr/lib64/libldap* /usr/lib/ + fi if [ ! -f "$extFile" ];then From 0b064346e506e42aebde0b7460c7a2b77dfffd4c Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 14:04:39 +0800 Subject: [PATCH 096/263] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/versions/52/install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/php/versions/52/install.sh b/plugins/php/versions/52/install.sh index 30378f0c4..ad227d789 100755 --- a/plugins/php/versions/52/install.sh +++ b/plugins/php/versions/52/install.sh @@ -161,8 +161,12 @@ if [ ! -d $serverPath/php/${PHP_VER}/lib/php/extensions/no-debug-non-zts-2006061 mkdir -p $serverPath/php/${PHP_VER}/lib/php/extensions/no-debug-non-zts-20060613 fi - +# ps -ef|grep php/52 |grep -v grep |awk '{print $2}'|xargs kill +# /www/server/php/init.d/php52 start +# /www/server/php/52/sbin/php-fpm start +# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start 52 mkdir -p $serverPath/php/${PHP_VER}/var/log +mkdir -p $serverPath/php/${PHP_VER}/var/run #------------------------ install end ------------------------------------# } From c7cef673fe3c11bbc8f0ce2c748763e0c21a8e65 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 14:13:26 +0800 Subject: [PATCH 097/263] Update index.html --- plugins/mysql/index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/mysql/index.html b/plugins/mysql/index.html index fe590a41e..0dc255328 100755 --- a/plugins/mysql/index.html +++ b/plugins/mysql/index.html @@ -52,7 +52,10 @@ \ No newline at end of file From 9af549e3981f914c3e9ddc7564bddd295d92651e Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 15:32:38 +0800 Subject: [PATCH 098/263] Update task.py --- task.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/task.py b/task.py index 01d6745ff..9d4529ccb 100755 --- a/task.py +++ b/task.py @@ -388,6 +388,15 @@ def check502(): def startPHPVersion(version): sdir = mw.getServerDir() try: + + # system + phpService = '/lib/systemd/system/php' + version + '.service' + if os.path.exists(phpService): + mw.execShell("systemctl reload php" + version) + if checkPHPVersion(version): + return True + + # initd fpm = sdir + '/php/init.d/php' + version php_path = sdir + '/php/' + version + '/sbin/php-fpm' if not os.path.exists(php_path): From d1f0500de6c0cafb00a6635f54523d758dcf4482 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 15:33:13 +0800 Subject: [PATCH 099/263] Update task.py --- task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/task.py b/task.py index 9d4529ccb..24b0dc10c 100755 --- a/task.py +++ b/task.py @@ -392,7 +392,7 @@ def startPHPVersion(version): # system phpService = '/lib/systemd/system/php' + version + '.service' if os.path.exists(phpService): - mw.execShell("systemctl reload php" + version) + mw.execShell("systemctl restart php" + version) if checkPHPVersion(version): return True From c1bbd31a787d1f66131227bf64b8a36676a407ff Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 18:01:51 +0800 Subject: [PATCH 100/263] up --- plugins/php/versions/52/eaccelerator.sh | 7 +++++-- plugins/php/versions/lib.sh | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 plugins/php/versions/lib.sh diff --git a/plugins/php/versions/52/eaccelerator.sh b/plugins/php/versions/52/eaccelerator.sh index 06ef44f52..0b5281de5 100755 --- a/plugins/php/versions/52/eaccelerator.sh +++ b/plugins/php/versions/52/eaccelerator.sh @@ -77,7 +77,9 @@ Install_lib() echo "${LIBNAME}.allowed_admin_path=/www/wwwroot/you_project_dir" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + + ${rootPath}/plugins/php/version/lib.sh $version restart + # $serverPath/php/init.d/php$version reload echo '===========================================================' echo 'successful!' } @@ -100,7 +102,8 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + + ${rootPath}/plugins/php/version/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/lib.sh b/plugins/php/versions/lib.sh new file mode 100644 index 000000000..5878fce4c --- /dev/null +++ b/plugins/php/versions/lib.sh @@ -0,0 +1,22 @@ +#!/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") + + +action=$1 +version=$2 + + +if [ -f /lib/systemd/system/php${version}.service ];then + systemctl ${action} php${version} +else + $serverPath/php/init.d/php${version} ${action} +fi \ No newline at end of file From 9609d31893a109f8b9c5ab88b45809c917c6ce25 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 18:07:44 +0800 Subject: [PATCH 101/263] up --- plugins/php/versions/52/eaccelerator.sh | 6 +++--- plugins/php/versions/52/intl.sh | 5 +++-- plugins/php/versions/52/ioncube.sh | 5 +++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/plugins/php/versions/52/eaccelerator.sh b/plugins/php/versions/52/eaccelerator.sh index 0b5281de5..a9e580d9d 100755 --- a/plugins/php/versions/52/eaccelerator.sh +++ b/plugins/php/versions/52/eaccelerator.sh @@ -78,7 +78,7 @@ Install_lib() - ${rootPath}/plugins/php/version/lib.sh $version restart + ${rootPath}/plugins/php/versions/lib.sh $version restart # $serverPath/php/init.d/php$version reload echo '===========================================================' echo 'successful!' @@ -102,8 +102,8 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - - ${rootPath}/plugins/php/version/lib.sh $version restart + + ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/52/intl.sh b/plugins/php/versions/52/intl.sh index d2d329a96..071d08bf9 100755 --- a/plugins/php/versions/52/intl.sh +++ b/plugins/php/versions/52/intl.sh @@ -62,7 +62,7 @@ Install_lib() 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 + ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -85,7 +85,8 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + + ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/52/ioncube.sh b/plugins/php/versions/52/ioncube.sh index bcd8729ef..c540c56e1 100755 --- a/plugins/php/versions/52/ioncube.sh +++ b/plugins/php/versions/52/ioncube.sh @@ -60,7 +60,7 @@ Install_lib() 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 + ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,8 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + + ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } From c3988391fb7b74d8f782ba8ea8879499b53be3f3 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 18:16:36 +0800 Subject: [PATCH 102/263] up --- plugins/php/versions/52/eaccelerator.sh | 5 ++--- plugins/php/versions/52/exif.sh | 5 +++-- plugins/php/versions/52/gd.sh | 5 +++-- plugins/php/versions/52/intl.sh | 4 ++-- plugins/php/versions/52/ioncube.sh | 6 +++--- plugins/php/versions/52/memcache.sh | 4 ++-- plugins/php/versions/52/openssl.sh | 7 ++++--- plugins/php/versions/52/pcntl.sh | 5 +++-- plugins/php/versions/52/redis.sh | 5 +++-- plugins/php/versions/52/xhprof.sh | 4 ++-- plugins/php/versions/52/zendoptimizer.sh | 4 ++-- plugins/php/versions/53/fileinfo.sh | 6 ++++-- 12 files changed, 33 insertions(+), 27 deletions(-) diff --git a/plugins/php/versions/52/eaccelerator.sh b/plugins/php/versions/52/eaccelerator.sh index a9e580d9d..bd50e9d95 100755 --- a/plugins/php/versions/52/eaccelerator.sh +++ b/plugins/php/versions/52/eaccelerator.sh @@ -78,8 +78,7 @@ Install_lib() - ${rootPath}/plugins/php/versions/lib.sh $version restart - # $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -103,7 +102,7 @@ Uninstall_lib() rm -f $extFile - ${rootPath}/plugins/php/versions/lib.sh $version restart + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/52/exif.sh b/plugins/php/versions/52/exif.sh index f52c194c5..bd2120f7a 100755 --- a/plugins/php/versions/52/exif.sh +++ b/plugins/php/versions/52/exif.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,8 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/52/gd.sh b/plugins/php/versions/52/gd.sh index 7931ddc00..56564ca6a 100755 --- a/plugins/php/versions/52/gd.sh +++ b/plugins/php/versions/52/gd.sh @@ -92,7 +92,7 @@ Install_lib() echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php${version} restart + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -115,7 +115,8 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/52/intl.sh b/plugins/php/versions/52/intl.sh index 071d08bf9..156677458 100755 --- a/plugins/php/versions/52/intl.sh +++ b/plugins/php/versions/52/intl.sh @@ -62,7 +62,7 @@ Install_lib() echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - ${rootPath}/plugins/php/versions/lib.sh $version restart + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() rm -f $extFile - ${rootPath}/plugins/php/versions/lib.sh $version restart + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/52/ioncube.sh b/plugins/php/versions/52/ioncube.sh index c540c56e1..40a8f5810 100755 --- a/plugins/php/versions/52/ioncube.sh +++ b/plugins/php/versions/52/ioncube.sh @@ -60,7 +60,7 @@ Install_lib() echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - ${rootPath}/plugins/php/versions/lib.sh $version restart + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,8 +83,8 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - - ${rootPath}/plugins/php/versions/lib.sh $version restart + + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/52/memcache.sh b/plugins/php/versions/52/memcache.sh index 8a465313d..d5f77addd 100755 --- a/plugins/php/versions/52/memcache.sh +++ b/plugins/php/versions/52/memcache.sh @@ -58,7 +58,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -81,7 +81,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/52/openssl.sh b/plugins/php/versions/52/openssl.sh index f1f581a5d..f36f459d7 100755 --- a/plugins/php/versions/52/openssl.sh +++ b/plugins/php/versions/52/openssl.sh @@ -66,8 +66,8 @@ 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 - - $serverPath/php/init.d/php$version reload + + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,8 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/52/pcntl.sh b/plugins/php/versions/52/pcntl.sh index 4a458ef2a..d0e628ec4 100755 --- a/plugins/php/versions/52/pcntl.sh +++ b/plugins/php/versions/52/pcntl.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,8 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/52/redis.sh b/plugins/php/versions/52/redis.sh index 8aa23aee9..df5e93651 100755 --- a/plugins/php/versions/52/redis.sh +++ b/plugins/php/versions/52/redis.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -85,7 +85,8 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/52/xhprof.sh b/plugins/php/versions/52/xhprof.sh index 7ee22f604..c80b5dbe2 100755 --- a/plugins/php/versions/52/xhprof.sh +++ b/plugins/php/versions/52/xhprof.sh @@ -66,7 +66,7 @@ Install_lib() echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/52/zendoptimizer.sh b/plugins/php/versions/52/zendoptimizer.sh index 5e11bcb53..338c8923f 100755 --- a/plugins/php/versions/52/zendoptimizer.sh +++ b/plugins/php/versions/52/zendoptimizer.sh @@ -67,7 +67,7 @@ Install_lib() echo "zend_loader.obfuscation_level_support=3" >> $serverPath/php/$version/etc/php.ini echo "zend_loader.license_path=" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/\[Zend ZendGuard Loader\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/fileinfo.sh b/plugins/php/versions/53/fileinfo.sh index 6966d6aaa..042a24f54 100755 --- a/plugins/php/versions/53/fileinfo.sh +++ b/plugins/php/versions/53/fileinfo.sh @@ -66,7 +66,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,9 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + + + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } From 19fcd2702d85bae8e6637616628833fa90eb239d Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 18:21:48 +0800 Subject: [PATCH 103/263] Update lib.sh --- plugins/php/versions/lib.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/php/versions/lib.sh b/plugins/php/versions/lib.sh index 5878fce4c..968a3ead1 100644 --- a/plugins/php/versions/lib.sh +++ b/plugins/php/versions/lib.sh @@ -3,17 +3,14 @@ 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") - -action=$1 -version=$2 - +version=$1 +action=$2 if [ -f /lib/systemd/system/php${version}.service ];then systemctl ${action} php${version} From d0090e9d6f3dd63a351b3fd6909a2f708325e6c3 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 18:30:45 +0800 Subject: [PATCH 104/263] up --- plugins/php/versions/53/apc.sh | 4 ++-- plugins/php/versions/53/eaccelerator.sh | 4 ++-- plugins/php/versions/53/exif.sh | 4 ++-- plugins/php/versions/53/intl.sh | 4 ++-- plugins/php/versions/53/ioncube.sh | 4 ++-- plugins/php/versions/53/memcache.sh | 4 ++-- plugins/php/versions/53/memcached.sh | 4 ++-- plugins/php/versions/53/mongo.sh | 5 +++-- plugins/php/versions/53/opcache.sh | 4 ++-- plugins/php/versions/53/openssl.sh | 4 ++-- plugins/php/versions/53/pcntl.sh | 4 ++-- plugins/php/versions/53/redis.sh | 4 ++-- plugins/php/versions/53/seaslog.sh | 4 ++-- plugins/php/versions/53/solr.sh | 4 ++-- plugins/php/versions/53/swoole.sh | 4 ++-- plugins/php/versions/53/xdebug.sh | 4 ++-- plugins/php/versions/53/xhprof.sh | 4 ++-- plugins/php/versions/53/yaf.sh | 4 ++-- plugins/php/versions/53/yar.sh | 4 ++-- plugins/php/versions/53/zendguardloader.sh | 4 ++-- 20 files changed, 41 insertions(+), 40 deletions(-) diff --git a/plugins/php/versions/53/apc.sh b/plugins/php/versions/53/apc.sh index 9db484777..0bff3a54a 100755 --- a/plugins/php/versions/53/apc.sh +++ b/plugins/php/versions/53/apc.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -85,7 +85,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/eaccelerator.sh b/plugins/php/versions/53/eaccelerator.sh index 42db42fdf..d8df39bb6 100755 --- a/plugins/php/versions/53/eaccelerator.sh +++ b/plugins/php/versions/53/eaccelerator.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/exif.sh b/plugins/php/versions/53/exif.sh index f52c194c5..7f02ce13b 100755 --- a/plugins/php/versions/53/exif.sh +++ b/plugins/php/versions/53/exif.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/intl.sh b/plugins/php/versions/53/intl.sh index 2e5c53f88..2279d47cc 100755 --- a/plugins/php/versions/53/intl.sh +++ b/plugins/php/versions/53/intl.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/ioncube.sh b/plugins/php/versions/53/ioncube.sh index bcd8729ef..ef5440382 100755 --- a/plugins/php/versions/53/ioncube.sh +++ b/plugins/php/versions/53/ioncube.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/memcache.sh b/plugins/php/versions/53/memcache.sh index f9869ae91..c212170a8 100755 --- a/plugins/php/versions/53/memcache.sh +++ b/plugins/php/versions/53/memcache.sh @@ -57,7 +57,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -80,7 +80,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/memcached.sh b/plugins/php/versions/53/memcached.sh index ef3afa830..984f03d24 100755 --- a/plugins/php/versions/53/memcached.sh +++ b/plugins/php/versions/53/memcached.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/mongo.sh b/plugins/php/versions/53/mongo.sh index 6902cf15f..03cb90e53 100755 --- a/plugins/php/versions/53/mongo.sh +++ b/plugins/php/versions/53/mongo.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,8 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/opcache.sh b/plugins/php/versions/53/opcache.sh index e72eeef9e..f849d9285 100755 --- a/plugins/php/versions/53/opcache.sh +++ b/plugins/php/versions/53/opcache.sh @@ -72,7 +72,7 @@ Install_lib() echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -96,7 +96,7 @@ Uninstall_lib() rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/openssl.sh b/plugins/php/versions/53/openssl.sh index f1f581a5d..4e353d132 100755 --- a/plugins/php/versions/53/openssl.sh +++ b/plugins/php/versions/53/openssl.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/pcntl.sh b/plugins/php/versions/53/pcntl.sh index 4a458ef2a..796b84897 100755 --- a/plugins/php/versions/53/pcntl.sh +++ b/plugins/php/versions/53/pcntl.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/redis.sh b/plugins/php/versions/53/redis.sh index 8539cbcfe..d3e0ab9ae 100755 --- a/plugins/php/versions/53/redis.sh +++ b/plugins/php/versions/53/redis.sh @@ -62,7 +62,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/seaslog.sh b/plugins/php/versions/53/seaslog.sh index bb5d03010..0c5c01176 100755 --- a/plugins/php/versions/53/seaslog.sh +++ b/plugins/php/versions/53/seaslog.sh @@ -69,7 +69,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -93,7 +93,7 @@ Uninstall_lib() sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/solr.sh b/plugins/php/versions/53/solr.sh index a748eee86..930a48cd8 100755 --- a/plugins/php/versions/53/solr.sh +++ b/plugins/php/versions/53/solr.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/swoole.sh b/plugins/php/versions/53/swoole.sh index c561bfb75..e7d9ca249 100755 --- a/plugins/php/versions/53/swoole.sh +++ b/plugins/php/versions/53/swoole.sh @@ -79,7 +79,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -103,7 +103,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/xdebug.sh b/plugins/php/versions/53/xdebug.sh index 349dfe1c8..34c0b80a1 100755 --- a/plugins/php/versions/53/xdebug.sh +++ b/plugins/php/versions/53/xdebug.sh @@ -62,7 +62,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -85,7 +85,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/xhprof.sh b/plugins/php/versions/53/xhprof.sh index 7ee22f604..c80b5dbe2 100755 --- a/plugins/php/versions/53/xhprof.sh +++ b/plugins/php/versions/53/xhprof.sh @@ -66,7 +66,7 @@ Install_lib() echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/yaf.sh b/plugins/php/versions/53/yaf.sh index b11323744..f65771c44 100755 --- a/plugins/php/versions/53/yaf.sh +++ b/plugins/php/versions/53/yaf.sh @@ -67,7 +67,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "yaf.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -92,7 +92,7 @@ Uninstall_lib() sed -i $BAK "/\[yaf\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/yar.sh b/plugins/php/versions/53/yar.sh index 49851c47a..505954e24 100755 --- a/plugins/php/versions/53/yar.sh +++ b/plugins/php/versions/53/yar.sh @@ -69,7 +69,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -94,7 +94,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/53/zendguardloader.sh b/plugins/php/versions/53/zendguardloader.sh index f86c82c57..8670e1296 100755 --- a/plugins/php/versions/53/zendguardloader.sh +++ b/plugins/php/versions/53/zendguardloader.sh @@ -66,7 +66,7 @@ Install_lib() echo "zend_loader.obfuscation_level_support=3" >> $serverPath/php/$version/etc/php.ini echo "zend_loader.license_path=" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/\[Zend ZendGuard Loader\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } From b01b34c289be5d5b1fbcee372bc90bdf7b774495 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 18:36:22 +0800 Subject: [PATCH 105/263] php 54 --- plugins/php/versions/54/apc.sh | 4 ++-- plugins/php/versions/54/exif.sh | 5 +++-- plugins/php/versions/54/fileinfo.sh | 4 ++-- plugins/php/versions/54/imagemagick.sh | 4 ++-- plugins/php/versions/54/intl.sh | 4 ++-- plugins/php/versions/54/ioncube.sh | 4 ++-- plugins/php/versions/54/memcache.sh | 4 ++-- plugins/php/versions/54/memcached.sh | 4 ++-- plugins/php/versions/54/mongo.sh | 4 ++-- plugins/php/versions/54/opcache.sh | 4 ++-- plugins/php/versions/54/openssl.sh | 4 ++-- plugins/php/versions/54/pcntl.sh | 4 ++-- plugins/php/versions/54/redis.sh | 4 ++-- plugins/php/versions/54/seaslog.sh | 4 ++-- plugins/php/versions/54/solr.sh | 4 ++-- plugins/php/versions/54/swoole.sh | 4 ++-- plugins/php/versions/54/xdebug.sh | 4 ++-- plugins/php/versions/54/xhprof.sh | 4 ++-- plugins/php/versions/54/yaf.sh | 4 ++-- plugins/php/versions/54/yar.sh | 4 ++-- plugins/php/versions/54/zendguardloader.sh | 4 ++-- 21 files changed, 43 insertions(+), 42 deletions(-) diff --git a/plugins/php/versions/54/apc.sh b/plugins/php/versions/54/apc.sh index 1c04d366a..156e46a98 100755 --- a/plugins/php/versions/54/apc.sh +++ b/plugins/php/versions/54/apc.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/exif.sh b/plugins/php/versions/54/exif.sh index f52c194c5..bd2120f7a 100755 --- a/plugins/php/versions/54/exif.sh +++ b/plugins/php/versions/54/exif.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,8 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/fileinfo.sh b/plugins/php/versions/54/fileinfo.sh index 6966d6aaa..193f44b2e 100755 --- a/plugins/php/versions/54/fileinfo.sh +++ b/plugins/php/versions/54/fileinfo.sh @@ -66,7 +66,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/imagemagick.sh b/plugins/php/versions/54/imagemagick.sh index 2ecfc7e92..da023947c 100755 --- a/plugins/php/versions/54/imagemagick.sh +++ b/plugins/php/versions/54/imagemagick.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/intl.sh b/plugins/php/versions/54/intl.sh index a0374a4f0..480e003ba 100755 --- a/plugins/php/versions/54/intl.sh +++ b/plugins/php/versions/54/intl.sh @@ -64,7 +64,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/ioncube.sh b/plugins/php/versions/54/ioncube.sh index bcd8729ef..ef5440382 100755 --- a/plugins/php/versions/54/ioncube.sh +++ b/plugins/php/versions/54/ioncube.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/memcache.sh b/plugins/php/versions/54/memcache.sh index 20727b72d..1f9410b79 100755 --- a/plugins/php/versions/54/memcache.sh +++ b/plugins/php/versions/54/memcache.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/memcached.sh b/plugins/php/versions/54/memcached.sh index f353ec37c..07ddb8ba0 100755 --- a/plugins/php/versions/54/memcached.sh +++ b/plugins/php/versions/54/memcached.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/mongo.sh b/plugins/php/versions/54/mongo.sh index 236822dfd..dba6f254f 100755 --- a/plugins/php/versions/54/mongo.sh +++ b/plugins/php/versions/54/mongo.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/opcache.sh b/plugins/php/versions/54/opcache.sh index 125edecf8..901d90422 100755 --- a/plugins/php/versions/54/opcache.sh +++ b/plugins/php/versions/54/opcache.sh @@ -71,7 +71,7 @@ Install_lib() echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -95,7 +95,7 @@ Uninstall_lib() rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/openssl.sh b/plugins/php/versions/54/openssl.sh index f1f581a5d..4e353d132 100755 --- a/plugins/php/versions/54/openssl.sh +++ b/plugins/php/versions/54/openssl.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/pcntl.sh b/plugins/php/versions/54/pcntl.sh index 4a458ef2a..796b84897 100755 --- a/plugins/php/versions/54/pcntl.sh +++ b/plugins/php/versions/54/pcntl.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/redis.sh b/plugins/php/versions/54/redis.sh index 34821d450..565e18c21 100755 --- a/plugins/php/versions/54/redis.sh +++ b/plugins/php/versions/54/redis.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/seaslog.sh b/plugins/php/versions/54/seaslog.sh index 039f8497e..8ec22536d 100755 --- a/plugins/php/versions/54/seaslog.sh +++ b/plugins/php/versions/54/seaslog.sh @@ -69,7 +69,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -93,7 +93,7 @@ Uninstall_lib() sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/solr.sh b/plugins/php/versions/54/solr.sh index df91c3dad..e8cbd5f88 100755 --- a/plugins/php/versions/54/solr.sh +++ b/plugins/php/versions/54/solr.sh @@ -66,7 +66,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/swoole.sh b/plugins/php/versions/54/swoole.sh index 5ccbe3d13..f0af7ff2f 100755 --- a/plugins/php/versions/54/swoole.sh +++ b/plugins/php/versions/54/swoole.sh @@ -76,7 +76,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -99,7 +99,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/xdebug.sh b/plugins/php/versions/54/xdebug.sh index 79bf20805..0fda414d9 100755 --- a/plugins/php/versions/54/xdebug.sh +++ b/plugins/php/versions/54/xdebug.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/xhprof.sh b/plugins/php/versions/54/xhprof.sh index 6a82bced9..5738efb1d 100755 --- a/plugins/php/versions/54/xhprof.sh +++ b/plugins/php/versions/54/xhprof.sh @@ -64,7 +64,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -88,7 +88,7 @@ Uninstall_lib() rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/yaf.sh b/plugins/php/versions/54/yaf.sh index a34398c74..5140d10e9 100755 --- a/plugins/php/versions/54/yaf.sh +++ b/plugins/php/versions/54/yaf.sh @@ -69,7 +69,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -93,7 +93,7 @@ Uninstall_lib() sed -i '_bak' "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/yar.sh b/plugins/php/versions/54/yar.sh index 853b1817d..a8be8e9f6 100755 --- a/plugins/php/versions/54/yar.sh +++ b/plugins/php/versions/54/yar.sh @@ -71,7 +71,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -96,7 +96,7 @@ Uninstall_lib() sed -i '_bak' "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/54/zendguardloader.sh b/plugins/php/versions/54/zendguardloader.sh index 11a00e57e..dff1474dd 100755 --- a/plugins/php/versions/54/zendguardloader.sh +++ b/plugins/php/versions/54/zendguardloader.sh @@ -57,7 +57,7 @@ Install_lib() echo "" >> $serverPath/php/$version/etc/php.ini echo -e "[Zend ZendGuard Loader]\nzend_extension=ZendGuardLoader.so\nzend_loader.enable=1\nzend_loader.disable_licensing=0\nzend_loader.obfuscation_level_support=3\nzend_loader.license_path=" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -81,7 +81,7 @@ Uninstall_lib() sed -i $BAK '/\[Zend ZendGuard Loader\]/d' $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } From 6c81f75d5f4d8e807a093ce81051f974a0bcb73f Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 18:38:47 +0800 Subject: [PATCH 106/263] php55 --- plugins/php/versions/55/exif.sh | 4 ++-- plugins/php/versions/55/fileinfo.sh | 4 ++-- plugins/php/versions/55/imagemagick.sh | 4 ++-- plugins/php/versions/55/intl.sh | 4 ++-- plugins/php/versions/55/ioncube.sh | 4 ++-- plugins/php/versions/55/memcache.sh | 4 ++-- plugins/php/versions/55/memcached.sh | 4 ++-- plugins/php/versions/55/mongo.sh | 4 ++-- plugins/php/versions/55/mongodb.sh | 4 ++-- plugins/php/versions/55/opcache.sh | 4 ++-- plugins/php/versions/55/openssl.sh | 4 ++-- plugins/php/versions/55/pcntl.sh | 4 ++-- plugins/php/versions/55/redis.sh | 4 ++-- plugins/php/versions/55/seaslog.sh | 4 ++-- plugins/php/versions/55/solr.sh | 4 ++-- plugins/php/versions/55/swoole.sh | 4 ++-- plugins/php/versions/55/xdebug.sh | 4 ++-- plugins/php/versions/55/xhprof.sh | 4 ++-- plugins/php/versions/55/yaf.sh | 4 ++-- plugins/php/versions/55/yar.sh | 4 ++-- 20 files changed, 40 insertions(+), 40 deletions(-) diff --git a/plugins/php/versions/55/exif.sh b/plugins/php/versions/55/exif.sh index f52c194c5..7f02ce13b 100755 --- a/plugins/php/versions/55/exif.sh +++ b/plugins/php/versions/55/exif.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/fileinfo.sh b/plugins/php/versions/55/fileinfo.sh index 6966d6aaa..193f44b2e 100755 --- a/plugins/php/versions/55/fileinfo.sh +++ b/plugins/php/versions/55/fileinfo.sh @@ -66,7 +66,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/imagemagick.sh b/plugins/php/versions/55/imagemagick.sh index 2ecfc7e92..da023947c 100755 --- a/plugins/php/versions/55/imagemagick.sh +++ b/plugins/php/versions/55/imagemagick.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/intl.sh b/plugins/php/versions/55/intl.sh index a0374a4f0..480e003ba 100755 --- a/plugins/php/versions/55/intl.sh +++ b/plugins/php/versions/55/intl.sh @@ -64,7 +64,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/ioncube.sh b/plugins/php/versions/55/ioncube.sh index bcd8729ef..ef5440382 100755 --- a/plugins/php/versions/55/ioncube.sh +++ b/plugins/php/versions/55/ioncube.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/memcache.sh b/plugins/php/versions/55/memcache.sh index d7f88dcde..9a40e291a 100755 --- a/plugins/php/versions/55/memcache.sh +++ b/plugins/php/versions/55/memcache.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/memcached.sh b/plugins/php/versions/55/memcached.sh index e04597bfc..5113c6b34 100755 --- a/plugins/php/versions/55/memcached.sh +++ b/plugins/php/versions/55/memcached.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/mongo.sh b/plugins/php/versions/55/mongo.sh index e06cccd04..798f24867 100755 --- a/plugins/php/versions/55/mongo.sh +++ b/plugins/php/versions/55/mongo.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/mongodb.sh b/plugins/php/versions/55/mongodb.sh index 7147a7d28..10da08429 100755 --- a/plugins/php/versions/55/mongodb.sh +++ b/plugins/php/versions/55/mongodb.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/opcache.sh b/plugins/php/versions/55/opcache.sh index bf85a54e0..500a12334 100755 --- a/plugins/php/versions/55/opcache.sh +++ b/plugins/php/versions/55/opcache.sh @@ -45,7 +45,7 @@ Install_lib() echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -56,7 +56,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/openssl.sh b/plugins/php/versions/55/openssl.sh index f1f581a5d..4e353d132 100755 --- a/plugins/php/versions/55/openssl.sh +++ b/plugins/php/versions/55/openssl.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/pcntl.sh b/plugins/php/versions/55/pcntl.sh index 4a458ef2a..796b84897 100755 --- a/plugins/php/versions/55/pcntl.sh +++ b/plugins/php/versions/55/pcntl.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/redis.sh b/plugins/php/versions/55/redis.sh index 53be55e29..b82d6bc8a 100755 --- a/plugins/php/versions/55/redis.sh +++ b/plugins/php/versions/55/redis.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/seaslog.sh b/plugins/php/versions/55/seaslog.sh index 3cde227ef..7add41d9d 100755 --- a/plugins/php/versions/55/seaslog.sh +++ b/plugins/php/versions/55/seaslog.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -92,7 +92,7 @@ Uninstall_lib() sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/solr.sh b/plugins/php/versions/55/solr.sh index a0acfcd84..8279e12fe 100755 --- a/plugins/php/versions/55/solr.sh +++ b/plugins/php/versions/55/solr.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/swoole.sh b/plugins/php/versions/55/swoole.sh index 94f34d62b..999124ef3 100755 --- a/plugins/php/versions/55/swoole.sh +++ b/plugins/php/versions/55/swoole.sh @@ -75,7 +75,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -98,7 +98,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/xdebug.sh b/plugins/php/versions/55/xdebug.sh index decf2180b..846b921db 100755 --- a/plugins/php/versions/55/xdebug.sh +++ b/plugins/php/versions/55/xdebug.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/xhprof.sh b/plugins/php/versions/55/xhprof.sh index 0efd5765a..9f6fec1d5 100755 --- a/plugins/php/versions/55/xhprof.sh +++ b/plugins/php/versions/55/xhprof.sh @@ -67,7 +67,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/yaf.sh b/plugins/php/versions/55/yaf.sh index 6ed74e16f..63c32817a 100755 --- a/plugins/php/versions/55/yaf.sh +++ b/plugins/php/versions/55/yaf.sh @@ -69,7 +69,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "yaf.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -93,7 +93,7 @@ Uninstall_lib() sed -i $BAK "/\[yaf\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/55/yar.sh b/plugins/php/versions/55/yar.sh index 7d6d99565..620c105b4 100755 --- a/plugins/php/versions/55/yar.sh +++ b/plugins/php/versions/55/yar.sh @@ -72,7 +72,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -97,7 +97,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } From e561fb28770c152caa5dc56a918a3171413e4b3d Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 18:40:19 +0800 Subject: [PATCH 107/263] php56 --- plugins/php/versions/56/exif.sh | 4 ++-- plugins/php/versions/56/fileinfo.sh | 4 ++-- plugins/php/versions/56/imagemagick.sh | 4 ++-- plugins/php/versions/56/intl.sh | 4 ++-- plugins/php/versions/56/ioncube.sh | 4 ++-- plugins/php/versions/56/memcache.sh | 4 ++-- plugins/php/versions/56/memcached.sh | 4 ++-- plugins/php/versions/56/mongo.sh | 4 ++-- plugins/php/versions/56/mongodb.sh | 4 ++-- plugins/php/versions/56/opcache.sh | 4 ++-- plugins/php/versions/56/openssl.sh | 4 ++-- plugins/php/versions/56/pcntl.sh | 4 ++-- plugins/php/versions/56/redis.sh | 4 ++-- plugins/php/versions/56/seaslog.sh | 4 ++-- plugins/php/versions/56/solr.sh | 4 ++-- plugins/php/versions/56/swoole.sh | 4 ++-- plugins/php/versions/56/xdebug.sh | 4 ++-- plugins/php/versions/56/xhprof.sh | 4 ++-- plugins/php/versions/56/yaf.sh | 4 ++-- plugins/php/versions/56/yar.sh | 4 ++-- plugins/php/versions/56/zendguardloader.sh | 4 ++-- 21 files changed, 42 insertions(+), 42 deletions(-) diff --git a/plugins/php/versions/56/exif.sh b/plugins/php/versions/56/exif.sh index f52c194c5..7f02ce13b 100755 --- a/plugins/php/versions/56/exif.sh +++ b/plugins/php/versions/56/exif.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/fileinfo.sh b/plugins/php/versions/56/fileinfo.sh index 6966d6aaa..193f44b2e 100755 --- a/plugins/php/versions/56/fileinfo.sh +++ b/plugins/php/versions/56/fileinfo.sh @@ -66,7 +66,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/imagemagick.sh b/plugins/php/versions/56/imagemagick.sh index 2ecfc7e92..da023947c 100755 --- a/plugins/php/versions/56/imagemagick.sh +++ b/plugins/php/versions/56/imagemagick.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/intl.sh b/plugins/php/versions/56/intl.sh index a0374a4f0..480e003ba 100755 --- a/plugins/php/versions/56/intl.sh +++ b/plugins/php/versions/56/intl.sh @@ -64,7 +64,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/ioncube.sh b/plugins/php/versions/56/ioncube.sh index bcd8729ef..ef5440382 100755 --- a/plugins/php/versions/56/ioncube.sh +++ b/plugins/php/versions/56/ioncube.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/memcache.sh b/plugins/php/versions/56/memcache.sh index d7f88dcde..9a40e291a 100755 --- a/plugins/php/versions/56/memcache.sh +++ b/plugins/php/versions/56/memcache.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/memcached.sh b/plugins/php/versions/56/memcached.sh index 23a8b2c19..85405d907 100755 --- a/plugins/php/versions/56/memcached.sh +++ b/plugins/php/versions/56/memcached.sh @@ -64,7 +64,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/mongo.sh b/plugins/php/versions/56/mongo.sh index 4ca876300..8ff77f0c8 100755 --- a/plugins/php/versions/56/mongo.sh +++ b/plugins/php/versions/56/mongo.sh @@ -66,7 +66,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/mongodb.sh b/plugins/php/versions/56/mongodb.sh index ef60a8600..bce5ea932 100755 --- a/plugins/php/versions/56/mongodb.sh +++ b/plugins/php/versions/56/mongodb.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/opcache.sh b/plugins/php/versions/56/opcache.sh index 0380d8c90..a4227c20e 100755 --- a/plugins/php/versions/56/opcache.sh +++ b/plugins/php/versions/56/opcache.sh @@ -44,7 +44,7 @@ Install_lib() echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -55,7 +55,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/openssl.sh b/plugins/php/versions/56/openssl.sh index f1f581a5d..4e353d132 100755 --- a/plugins/php/versions/56/openssl.sh +++ b/plugins/php/versions/56/openssl.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/pcntl.sh b/plugins/php/versions/56/pcntl.sh index 4a458ef2a..796b84897 100755 --- a/plugins/php/versions/56/pcntl.sh +++ b/plugins/php/versions/56/pcntl.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/redis.sh b/plugins/php/versions/56/redis.sh index 18952c19d..252c7e942 100755 --- a/plugins/php/versions/56/redis.sh +++ b/plugins/php/versions/56/redis.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/seaslog.sh b/plugins/php/versions/56/seaslog.sh index f50fffecd..190e266e4 100755 --- a/plugins/php/versions/56/seaslog.sh +++ b/plugins/php/versions/56/seaslog.sh @@ -66,7 +66,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/solr.sh b/plugins/php/versions/56/solr.sh index 8e9382ff5..5a1d3b159 100755 --- a/plugins/php/versions/56/solr.sh +++ b/plugins/php/versions/56/solr.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/swoole.sh b/plugins/php/versions/56/swoole.sh index 4d9bf30e9..cb3907c1d 100755 --- a/plugins/php/versions/56/swoole.sh +++ b/plugins/php/versions/56/swoole.sh @@ -77,7 +77,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -100,7 +100,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/xdebug.sh b/plugins/php/versions/56/xdebug.sh index bdac443aa..681ee3495 100755 --- a/plugins/php/versions/56/xdebug.sh +++ b/plugins/php/versions/56/xdebug.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/xhprof.sh b/plugins/php/versions/56/xhprof.sh index 928ea569e..43c9fac63 100755 --- a/plugins/php/versions/56/xhprof.sh +++ b/plugins/php/versions/56/xhprof.sh @@ -67,7 +67,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/yaf.sh b/plugins/php/versions/56/yaf.sh index 7ef1f7715..87f953439 100755 --- a/plugins/php/versions/56/yaf.sh +++ b/plugins/php/versions/56/yaf.sh @@ -56,7 +56,7 @@ Install_lib() echo -e "[yaf]\nextension=yaf.so\nyaf.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -81,7 +81,7 @@ Uninstall_lib() sed -i $BAK '/\[yaf\]/d' $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/yar.sh b/plugins/php/versions/56/yar.sh index 911563896..202208c33 100755 --- a/plugins/php/versions/56/yar.sh +++ b/plugins/php/versions/56/yar.sh @@ -69,7 +69,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -94,7 +94,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/56/zendguardloader.sh b/plugins/php/versions/56/zendguardloader.sh index 976101749..431b5ef75 100755 --- a/plugins/php/versions/56/zendguardloader.sh +++ b/plugins/php/versions/56/zendguardloader.sh @@ -58,7 +58,7 @@ Install_lib() echo -e "[Zend ZendGuard Loader]\nzend_extension=ZendGuardLoader.so\nzend_loader.enable=1\nzend_loader.disable_licensing=0\nzend_loader.obfuscation_level_support=3\nzend_loader.license_path=" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK '/\[Zend ZendGuard Loader\]/d' $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } From a30b8b684925149975b67f8ec53f047fa39d81a0 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 18:43:26 +0800 Subject: [PATCH 108/263] all --- plugins/php/versions/70/exif.sh | 4 ++-- plugins/php/versions/70/fileinfo.sh | 4 ++-- plugins/php/versions/70/imagemagick.sh | 4 ++-- plugins/php/versions/70/intl.sh | 4 ++-- plugins/php/versions/70/ioncube.sh | 4 ++-- plugins/php/versions/70/memcached.sh | 4 ++-- plugins/php/versions/70/mongodb.sh | 4 ++-- plugins/php/versions/70/opcache.sh | 4 ++-- plugins/php/versions/70/openssl.sh | 4 ++-- plugins/php/versions/70/pcntl.sh | 4 ++-- plugins/php/versions/70/redis.sh | 4 ++-- plugins/php/versions/70/seaslog.sh | 4 ++-- plugins/php/versions/70/solr.sh | 4 ++-- plugins/php/versions/70/swoole.sh | 4 ++-- plugins/php/versions/70/xdebug.sh | 4 ++-- plugins/php/versions/70/xhprof.sh | 4 ++-- plugins/php/versions/70/yac.sh | 4 ++-- plugins/php/versions/70/yaf.sh | 4 ++-- plugins/php/versions/70/yar.sh | 4 ++-- plugins/php/versions/70/zip.sh | 4 ++-- plugins/php/versions/70/zlib.sh | 4 ++-- plugins/php/versions/71/exif.sh | 4 ++-- plugins/php/versions/71/fileinfo.sh | 4 ++-- plugins/php/versions/71/imagemagick.sh | 4 ++-- plugins/php/versions/71/intl.sh | 4 ++-- plugins/php/versions/71/ioncube.sh | 4 ++-- plugins/php/versions/71/mcrypt.sh | 4 ++-- plugins/php/versions/71/memcached.sh | 4 ++-- plugins/php/versions/71/mongodb.sh | 4 ++-- plugins/php/versions/71/opcache.sh | 4 ++-- plugins/php/versions/71/openssl.sh | 4 ++-- plugins/php/versions/71/pcntl.sh | 4 ++-- plugins/php/versions/71/redis.sh | 4 ++-- plugins/php/versions/71/seaslog.sh | 4 ++-- plugins/php/versions/71/solr.sh | 4 ++-- plugins/php/versions/71/swoole.sh | 4 ++-- plugins/php/versions/71/xdebug.sh | 4 ++-- plugins/php/versions/71/xhprof.sh | 4 ++-- plugins/php/versions/71/yac.sh | 4 ++-- plugins/php/versions/71/yaf.sh | 4 ++-- plugins/php/versions/71/yar.sh | 4 ++-- plugins/php/versions/71/zip.sh | 4 ++-- plugins/php/versions/71/zlib.sh | 4 ++-- plugins/php/versions/72/exif.sh | 4 ++-- plugins/php/versions/72/fileinfo.sh | 4 ++-- plugins/php/versions/72/imagemagick.sh | 4 ++-- plugins/php/versions/72/intl.sh | 4 ++-- plugins/php/versions/72/ioncube.sh | 4 ++-- plugins/php/versions/72/mcrypt.sh | 4 ++-- plugins/php/versions/72/memcached.sh | 4 ++-- plugins/php/versions/72/mongodb.sh | 4 ++-- plugins/php/versions/72/opcache.sh | 4 ++-- plugins/php/versions/72/openssl.sh | 4 ++-- plugins/php/versions/72/pcntl.sh | 4 ++-- plugins/php/versions/72/redis.sh | 4 ++-- plugins/php/versions/72/seaslog.sh | 4 ++-- plugins/php/versions/72/solr.sh | 4 ++-- plugins/php/versions/72/swoole.sh | 4 ++-- plugins/php/versions/72/xdebug.sh | 4 ++-- plugins/php/versions/72/xhprof.sh | 4 ++-- plugins/php/versions/72/yac.sh | 4 ++-- plugins/php/versions/72/yaf.sh | 4 ++-- plugins/php/versions/72/yar.sh | 4 ++-- plugins/php/versions/72/zip.sh | 4 ++-- plugins/php/versions/72/zlib.sh | 4 ++-- plugins/php/versions/73/exif.sh | 4 ++-- plugins/php/versions/73/fileinfo.sh | 4 ++-- plugins/php/versions/73/imagemagick.sh | 4 ++-- plugins/php/versions/73/intl.sh | 4 ++-- plugins/php/versions/73/ioncube.sh | 4 ++-- plugins/php/versions/73/mcrypt.sh | 4 ++-- plugins/php/versions/73/memcached.sh | 4 ++-- plugins/php/versions/73/mongodb.sh | 4 ++-- plugins/php/versions/73/opcache.sh | 4 ++-- plugins/php/versions/73/openssl.sh | 4 ++-- plugins/php/versions/73/pcntl.sh | 4 ++-- plugins/php/versions/73/redis.sh | 4 ++-- plugins/php/versions/73/seaslog.sh | 4 ++-- plugins/php/versions/73/solr.sh | 4 ++-- plugins/php/versions/73/swoole.sh | 4 ++-- plugins/php/versions/73/xdebug.sh | 4 ++-- plugins/php/versions/73/xhprof.sh | 4 ++-- plugins/php/versions/73/yac.sh | 4 ++-- plugins/php/versions/73/yaf.sh | 4 ++-- plugins/php/versions/73/yar.sh | 4 ++-- plugins/php/versions/73/zip.sh | 4 ++-- plugins/php/versions/73/zlib.sh | 4 ++-- plugins/php/versions/74/exif.sh | 4 ++-- plugins/php/versions/74/fileinfo.sh | 4 ++-- plugins/php/versions/74/gd.sh | 2 +- plugins/php/versions/74/imagemagick.sh | 4 ++-- plugins/php/versions/74/intl.sh | 4 ++-- plugins/php/versions/74/ioncube.sh | 4 ++-- plugins/php/versions/74/mcrypt.sh | 4 ++-- plugins/php/versions/74/memcached.sh | 4 ++-- plugins/php/versions/74/mongodb.sh | 4 ++-- plugins/php/versions/74/opcache.sh | 4 ++-- plugins/php/versions/74/openssl.sh | 4 ++-- plugins/php/versions/74/pcntl.sh | 4 ++-- plugins/php/versions/74/redis.sh | 4 ++-- plugins/php/versions/74/seaslog.sh | 4 ++-- plugins/php/versions/74/solr.sh | 4 ++-- plugins/php/versions/74/swoole.sh | 4 ++-- plugins/php/versions/74/xdebug.sh | 4 ++-- plugins/php/versions/74/xhprof.sh | 4 ++-- plugins/php/versions/74/yac.sh | 4 ++-- plugins/php/versions/74/yaf.sh | 4 ++-- plugins/php/versions/74/yar.sh | 4 ++-- plugins/php/versions/74/zip.sh | 4 ++-- plugins/php/versions/74/zlib.sh | 4 ++-- plugins/php/versions/80/exif.sh | 4 ++-- plugins/php/versions/80/fileinfo.sh | 4 ++-- plugins/php/versions/80/gd.sh | 2 +- plugins/php/versions/80/imagemagick.sh | 4 ++-- plugins/php/versions/80/intl.sh | 4 ++-- plugins/php/versions/80/mcrypt.sh | 4 ++-- plugins/php/versions/80/memcached.sh | 4 ++-- plugins/php/versions/80/mongodb.sh | 4 ++-- plugins/php/versions/80/opcache.sh | 4 ++-- plugins/php/versions/80/openssl.sh | 4 ++-- plugins/php/versions/80/pcntl.sh | 4 ++-- plugins/php/versions/80/redis.sh | 4 ++-- plugins/php/versions/80/seaslog.sh | 4 ++-- plugins/php/versions/80/solr.sh | 4 ++-- plugins/php/versions/80/swoole.sh | 4 ++-- plugins/php/versions/80/xdebug.sh | 4 ++-- plugins/php/versions/80/xhprof.sh | 4 ++-- plugins/php/versions/80/yac.sh | 4 ++-- plugins/php/versions/80/yaf.sh | 4 ++-- plugins/php/versions/80/yar.sh | 4 ++-- plugins/php/versions/80/zip.sh | 4 ++-- plugins/php/versions/80/zlib.sh | 4 ++-- plugins/php/versions/81/exif.sh | 4 ++-- plugins/php/versions/81/fileinfo.sh | 4 ++-- plugins/php/versions/81/gd.sh | 2 +- plugins/php/versions/81/imagemagick.sh | 4 ++-- plugins/php/versions/81/intl.sh | 4 ++-- plugins/php/versions/81/mcrypt.sh | 4 ++-- plugins/php/versions/81/memcached.sh | 4 ++-- plugins/php/versions/81/mongodb.sh | 4 ++-- plugins/php/versions/81/opcache.sh | 4 ++-- plugins/php/versions/81/openssl.sh | 4 ++-- plugins/php/versions/81/pcntl.sh | 4 ++-- plugins/php/versions/81/redis.sh | 4 ++-- plugins/php/versions/81/seaslog.sh | 4 ++-- plugins/php/versions/81/solr.sh | 4 ++-- plugins/php/versions/81/swoole.sh | 4 ++-- plugins/php/versions/81/xdebug.sh | 4 ++-- plugins/php/versions/81/xhprof.sh | 4 ++-- plugins/php/versions/81/yac.sh | 4 ++-- plugins/php/versions/81/yaf.sh | 4 ++-- plugins/php/versions/81/yar.sh | 4 ++-- plugins/php/versions/81/zip.sh | 4 ++-- plugins/php/versions/81/zlib.sh | 4 ++-- 154 files changed, 305 insertions(+), 305 deletions(-) diff --git a/plugins/php/versions/70/exif.sh b/plugins/php/versions/70/exif.sh index f52c194c5..7f02ce13b 100755 --- a/plugins/php/versions/70/exif.sh +++ b/plugins/php/versions/70/exif.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/fileinfo.sh b/plugins/php/versions/70/fileinfo.sh index 6966d6aaa..193f44b2e 100755 --- a/plugins/php/versions/70/fileinfo.sh +++ b/plugins/php/versions/70/fileinfo.sh @@ -66,7 +66,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/imagemagick.sh b/plugins/php/versions/70/imagemagick.sh index 7490287e6..6c9688423 100755 --- a/plugins/php/versions/70/imagemagick.sh +++ b/plugins/php/versions/70/imagemagick.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/intl.sh b/plugins/php/versions/70/intl.sh index a0374a4f0..480e003ba 100755 --- a/plugins/php/versions/70/intl.sh +++ b/plugins/php/versions/70/intl.sh @@ -64,7 +64,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/ioncube.sh b/plugins/php/versions/70/ioncube.sh index bcd8729ef..ef5440382 100755 --- a/plugins/php/versions/70/ioncube.sh +++ b/plugins/php/versions/70/ioncube.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/memcached.sh b/plugins/php/versions/70/memcached.sh index 83b8315e8..264d9dbcd 100755 --- a/plugins/php/versions/70/memcached.sh +++ b/plugins/php/versions/70/memcached.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/mongodb.sh b/plugins/php/versions/70/mongodb.sh index 870b4aeeb..cfb2e8c11 100755 --- a/plugins/php/versions/70/mongodb.sh +++ b/plugins/php/versions/70/mongodb.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/opcache.sh b/plugins/php/versions/70/opcache.sh index 2d3b4a759..0547b1b76 100755 --- a/plugins/php/versions/70/opcache.sh +++ b/plugins/php/versions/70/opcache.sh @@ -44,7 +44,7 @@ Install_lib() echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -55,7 +55,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/openssl.sh b/plugins/php/versions/70/openssl.sh index 17950eef8..bdd1323e5 100755 --- a/plugins/php/versions/70/openssl.sh +++ b/plugins/php/versions/70/openssl.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/pcntl.sh b/plugins/php/versions/70/pcntl.sh index 4a458ef2a..796b84897 100755 --- a/plugins/php/versions/70/pcntl.sh +++ b/plugins/php/versions/70/pcntl.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/redis.sh b/plugins/php/versions/70/redis.sh index d9ef39853..2afdbe684 100755 --- a/plugins/php/versions/70/redis.sh +++ b/plugins/php/versions/70/redis.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/seaslog.sh b/plugins/php/versions/70/seaslog.sh index 84aa5d6e4..aa04d92d2 100755 --- a/plugins/php/versions/70/seaslog.sh +++ b/plugins/php/versions/70/seaslog.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/solr.sh b/plugins/php/versions/70/solr.sh index 2c9172224..9d34a2760 100755 --- a/plugins/php/versions/70/solr.sh +++ b/plugins/php/versions/70/solr.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/swoole.sh b/plugins/php/versions/70/swoole.sh index 5de04a617..7a197da2b 100755 --- a/plugins/php/versions/70/swoole.sh +++ b/plugins/php/versions/70/swoole.sh @@ -75,7 +75,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -98,7 +98,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/xdebug.sh b/plugins/php/versions/70/xdebug.sh index e55391fed..ea188200b 100755 --- a/plugins/php/versions/70/xdebug.sh +++ b/plugins/php/versions/70/xdebug.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/xhprof.sh b/plugins/php/versions/70/xhprof.sh index 78654123f..6c0f5eeb4 100755 --- a/plugins/php/versions/70/xhprof.sh +++ b/plugins/php/versions/70/xhprof.sh @@ -66,7 +66,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/yac.sh b/plugins/php/versions/70/yac.sh index 2687801c0..3ff9d3bff 100755 --- a/plugins/php/versions/70/yac.sh +++ b/plugins/php/versions/70/yac.sh @@ -64,7 +64,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/yaf.sh b/plugins/php/versions/70/yaf.sh index 94543b9cc..b5713edeb 100755 --- a/plugins/php/versions/70/yaf.sh +++ b/plugins/php/versions/70/yaf.sh @@ -64,7 +64,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -88,7 +88,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/yar.sh b/plugins/php/versions/70/yar.sh index 336050648..f75185834 100755 --- a/plugins/php/versions/70/yar.sh +++ b/plugins/php/versions/70/yar.sh @@ -68,7 +68,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -93,7 +93,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/zip.sh b/plugins/php/versions/70/zip.sh index ab58ab823..4606559ba 100755 --- a/plugins/php/versions/70/zip.sh +++ b/plugins/php/versions/70/zip.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/70/zlib.sh b/plugins/php/versions/70/zlib.sh index 030733cb3..becdb182d 100755 --- a/plugins/php/versions/70/zlib.sh +++ b/plugins/php/versions/70/zlib.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -88,7 +88,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/exif.sh b/plugins/php/versions/71/exif.sh index f52c194c5..7f02ce13b 100755 --- a/plugins/php/versions/71/exif.sh +++ b/plugins/php/versions/71/exif.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/fileinfo.sh b/plugins/php/versions/71/fileinfo.sh index 6966d6aaa..193f44b2e 100755 --- a/plugins/php/versions/71/fileinfo.sh +++ b/plugins/php/versions/71/fileinfo.sh @@ -66,7 +66,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/imagemagick.sh b/plugins/php/versions/71/imagemagick.sh index 7490287e6..6c9688423 100755 --- a/plugins/php/versions/71/imagemagick.sh +++ b/plugins/php/versions/71/imagemagick.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/intl.sh b/plugins/php/versions/71/intl.sh index a0374a4f0..480e003ba 100755 --- a/plugins/php/versions/71/intl.sh +++ b/plugins/php/versions/71/intl.sh @@ -64,7 +64,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/ioncube.sh b/plugins/php/versions/71/ioncube.sh index bcd8729ef..ef5440382 100755 --- a/plugins/php/versions/71/ioncube.sh +++ b/plugins/php/versions/71/ioncube.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/mcrypt.sh b/plugins/php/versions/71/mcrypt.sh index 73a1fcbf9..93a5b4aa7 100755 --- a/plugins/php/versions/71/mcrypt.sh +++ b/plugins/php/versions/71/mcrypt.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/memcached.sh b/plugins/php/versions/71/memcached.sh index ecd1ee770..cd31d0110 100755 --- a/plugins/php/versions/71/memcached.sh +++ b/plugins/php/versions/71/memcached.sh @@ -62,7 +62,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -85,7 +85,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/mongodb.sh b/plugins/php/versions/71/mongodb.sh index b66a44b96..ec61dcc33 100755 --- a/plugins/php/versions/71/mongodb.sh +++ b/plugins/php/versions/71/mongodb.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/opcache.sh b/plugins/php/versions/71/opcache.sh index 0380d8c90..a4227c20e 100755 --- a/plugins/php/versions/71/opcache.sh +++ b/plugins/php/versions/71/opcache.sh @@ -44,7 +44,7 @@ Install_lib() echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -55,7 +55,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/openssl.sh b/plugins/php/versions/71/openssl.sh index 17950eef8..bdd1323e5 100755 --- a/plugins/php/versions/71/openssl.sh +++ b/plugins/php/versions/71/openssl.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/pcntl.sh b/plugins/php/versions/71/pcntl.sh index 4a458ef2a..796b84897 100755 --- a/plugins/php/versions/71/pcntl.sh +++ b/plugins/php/versions/71/pcntl.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/redis.sh b/plugins/php/versions/71/redis.sh index d9a188a7d..17485ef91 100755 --- a/plugins/php/versions/71/redis.sh +++ b/plugins/php/versions/71/redis.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/seaslog.sh b/plugins/php/versions/71/seaslog.sh index 7e6671abd..4ce5de4b2 100755 --- a/plugins/php/versions/71/seaslog.sh +++ b/plugins/php/versions/71/seaslog.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -92,7 +92,7 @@ Uninstall_lib() sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/solr.sh b/plugins/php/versions/71/solr.sh index f24d1cebf..3acb559de 100755 --- a/plugins/php/versions/71/solr.sh +++ b/plugins/php/versions/71/solr.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/swoole.sh b/plugins/php/versions/71/swoole.sh index fc44a2b07..94a409fcd 100755 --- a/plugins/php/versions/71/swoole.sh +++ b/plugins/php/versions/71/swoole.sh @@ -73,7 +73,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -96,7 +96,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/xdebug.sh b/plugins/php/versions/71/xdebug.sh index 8fbb08afd..267a79d80 100755 --- a/plugins/php/versions/71/xdebug.sh +++ b/plugins/php/versions/71/xdebug.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/xhprof.sh b/plugins/php/versions/71/xhprof.sh index bd684f2ed..f56547b75 100755 --- a/plugins/php/versions/71/xhprof.sh +++ b/plugins/php/versions/71/xhprof.sh @@ -67,7 +67,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/yac.sh b/plugins/php/versions/71/yac.sh index b34f952b8..d3001a111 100755 --- a/plugins/php/versions/71/yac.sh +++ b/plugins/php/versions/71/yac.sh @@ -67,7 +67,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/yaf.sh b/plugins/php/versions/71/yaf.sh index 1e224d8f3..d0425d0bc 100755 --- a/plugins/php/versions/71/yaf.sh +++ b/plugins/php/versions/71/yaf.sh @@ -63,7 +63,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/yar.sh b/plugins/php/versions/71/yar.sh index 04e912a30..21ccf3142 100755 --- a/plugins/php/versions/71/yar.sh +++ b/plugins/php/versions/71/yar.sh @@ -71,7 +71,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -96,7 +96,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/zip.sh b/plugins/php/versions/71/zip.sh index ab58ab823..4606559ba 100755 --- a/plugins/php/versions/71/zip.sh +++ b/plugins/php/versions/71/zip.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/71/zlib.sh b/plugins/php/versions/71/zlib.sh index 030733cb3..becdb182d 100755 --- a/plugins/php/versions/71/zlib.sh +++ b/plugins/php/versions/71/zlib.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -88,7 +88,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/exif.sh b/plugins/php/versions/72/exif.sh index f52c194c5..7f02ce13b 100755 --- a/plugins/php/versions/72/exif.sh +++ b/plugins/php/versions/72/exif.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/fileinfo.sh b/plugins/php/versions/72/fileinfo.sh index 6966d6aaa..193f44b2e 100755 --- a/plugins/php/versions/72/fileinfo.sh +++ b/plugins/php/versions/72/fileinfo.sh @@ -66,7 +66,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/imagemagick.sh b/plugins/php/versions/72/imagemagick.sh index 7490287e6..6c9688423 100755 --- a/plugins/php/versions/72/imagemagick.sh +++ b/plugins/php/versions/72/imagemagick.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/intl.sh b/plugins/php/versions/72/intl.sh index a0374a4f0..480e003ba 100755 --- a/plugins/php/versions/72/intl.sh +++ b/plugins/php/versions/72/intl.sh @@ -64,7 +64,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/ioncube.sh b/plugins/php/versions/72/ioncube.sh index bcd8729ef..ef5440382 100755 --- a/plugins/php/versions/72/ioncube.sh +++ b/plugins/php/versions/72/ioncube.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/mcrypt.sh b/plugins/php/versions/72/mcrypt.sh index c65df5a28..d37a096b5 100755 --- a/plugins/php/versions/72/mcrypt.sh +++ b/plugins/php/versions/72/mcrypt.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/memcached.sh b/plugins/php/versions/72/memcached.sh index 22f7871fb..9b8a4e815 100755 --- a/plugins/php/versions/72/memcached.sh +++ b/plugins/php/versions/72/memcached.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/mongodb.sh b/plugins/php/versions/72/mongodb.sh index ba92f1267..f8ab90551 100755 --- a/plugins/php/versions/72/mongodb.sh +++ b/plugins/php/versions/72/mongodb.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/opcache.sh b/plugins/php/versions/72/opcache.sh index 2d3b4a759..0547b1b76 100755 --- a/plugins/php/versions/72/opcache.sh +++ b/plugins/php/versions/72/opcache.sh @@ -44,7 +44,7 @@ Install_lib() echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -55,7 +55,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/openssl.sh b/plugins/php/versions/72/openssl.sh index 17950eef8..bdd1323e5 100755 --- a/plugins/php/versions/72/openssl.sh +++ b/plugins/php/versions/72/openssl.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/pcntl.sh b/plugins/php/versions/72/pcntl.sh index 4a458ef2a..796b84897 100755 --- a/plugins/php/versions/72/pcntl.sh +++ b/plugins/php/versions/72/pcntl.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/redis.sh b/plugins/php/versions/72/redis.sh index 774119a76..fe782a92c 100755 --- a/plugins/php/versions/72/redis.sh +++ b/plugins/php/versions/72/redis.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/seaslog.sh b/plugins/php/versions/72/seaslog.sh index ad0746fda..dde11a1a1 100755 --- a/plugins/php/versions/72/seaslog.sh +++ b/plugins/php/versions/72/seaslog.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/solr.sh b/plugins/php/versions/72/solr.sh index e1c70fe07..2e6f508d4 100755 --- a/plugins/php/versions/72/solr.sh +++ b/plugins/php/versions/72/solr.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/swoole.sh b/plugins/php/versions/72/swoole.sh index 7d11372da..dae2f8eaf 100755 --- a/plugins/php/versions/72/swoole.sh +++ b/plugins/php/versions/72/swoole.sh @@ -74,7 +74,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -97,7 +97,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/xdebug.sh b/plugins/php/versions/72/xdebug.sh index 97ecfdb86..6e46ded96 100755 --- a/plugins/php/versions/72/xdebug.sh +++ b/plugins/php/versions/72/xdebug.sh @@ -58,7 +58,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -81,7 +81,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/xhprof.sh b/plugins/php/versions/72/xhprof.sh index 759081253..6c64c6d5f 100755 --- a/plugins/php/versions/72/xhprof.sh +++ b/plugins/php/versions/72/xhprof.sh @@ -66,7 +66,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/yac.sh b/plugins/php/versions/72/yac.sh index 995a4f9a1..d1fb22520 100755 --- a/plugins/php/versions/72/yac.sh +++ b/plugins/php/versions/72/yac.sh @@ -64,7 +64,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/yaf.sh b/plugins/php/versions/72/yaf.sh index e14b8a79d..2e0683075 100755 --- a/plugins/php/versions/72/yaf.sh +++ b/plugins/php/versions/72/yaf.sh @@ -64,7 +64,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -88,7 +88,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/yar.sh b/plugins/php/versions/72/yar.sh index fdfea8970..0f0aa9c65 100755 --- a/plugins/php/versions/72/yar.sh +++ b/plugins/php/versions/72/yar.sh @@ -72,7 +72,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -97,7 +97,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/zip.sh b/plugins/php/versions/72/zip.sh index ab58ab823..4606559ba 100755 --- a/plugins/php/versions/72/zip.sh +++ b/plugins/php/versions/72/zip.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/72/zlib.sh b/plugins/php/versions/72/zlib.sh index 030733cb3..becdb182d 100755 --- a/plugins/php/versions/72/zlib.sh +++ b/plugins/php/versions/72/zlib.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -88,7 +88,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/exif.sh b/plugins/php/versions/73/exif.sh index f52c194c5..7f02ce13b 100755 --- a/plugins/php/versions/73/exif.sh +++ b/plugins/php/versions/73/exif.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/fileinfo.sh b/plugins/php/versions/73/fileinfo.sh index 6966d6aaa..193f44b2e 100755 --- a/plugins/php/versions/73/fileinfo.sh +++ b/plugins/php/versions/73/fileinfo.sh @@ -66,7 +66,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/imagemagick.sh b/plugins/php/versions/73/imagemagick.sh index 7490287e6..6c9688423 100755 --- a/plugins/php/versions/73/imagemagick.sh +++ b/plugins/php/versions/73/imagemagick.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/intl.sh b/plugins/php/versions/73/intl.sh index a0374a4f0..480e003ba 100755 --- a/plugins/php/versions/73/intl.sh +++ b/plugins/php/versions/73/intl.sh @@ -64,7 +64,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/ioncube.sh b/plugins/php/versions/73/ioncube.sh index bcd8729ef..ef5440382 100755 --- a/plugins/php/versions/73/ioncube.sh +++ b/plugins/php/versions/73/ioncube.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/mcrypt.sh b/plugins/php/versions/73/mcrypt.sh index c65df5a28..d37a096b5 100755 --- a/plugins/php/versions/73/mcrypt.sh +++ b/plugins/php/versions/73/mcrypt.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/memcached.sh b/plugins/php/versions/73/memcached.sh index d55d6da30..7867c851d 100755 --- a/plugins/php/versions/73/memcached.sh +++ b/plugins/php/versions/73/memcached.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/mongodb.sh b/plugins/php/versions/73/mongodb.sh index d7dd61db4..9a9c3180b 100755 --- a/plugins/php/versions/73/mongodb.sh +++ b/plugins/php/versions/73/mongodb.sh @@ -58,7 +58,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -81,7 +81,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/opcache.sh b/plugins/php/versions/73/opcache.sh index 1da2f3ee5..73d59f1ed 100755 --- a/plugins/php/versions/73/opcache.sh +++ b/plugins/php/versions/73/opcache.sh @@ -45,7 +45,7 @@ Install_lib() echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -56,7 +56,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/openssl.sh b/plugins/php/versions/73/openssl.sh index 17950eef8..bdd1323e5 100755 --- a/plugins/php/versions/73/openssl.sh +++ b/plugins/php/versions/73/openssl.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/pcntl.sh b/plugins/php/versions/73/pcntl.sh index 4a458ef2a..796b84897 100755 --- a/plugins/php/versions/73/pcntl.sh +++ b/plugins/php/versions/73/pcntl.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/redis.sh b/plugins/php/versions/73/redis.sh index e96b0eed9..723f604f2 100755 --- a/plugins/php/versions/73/redis.sh +++ b/plugins/php/versions/73/redis.sh @@ -58,7 +58,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/seaslog.sh b/plugins/php/versions/73/seaslog.sh index 07e8f3dd0..bd0ad3c7e 100755 --- a/plugins/php/versions/73/seaslog.sh +++ b/plugins/php/versions/73/seaslog.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/solr.sh b/plugins/php/versions/73/solr.sh index 636f1094d..7a9186002 100755 --- a/plugins/php/versions/73/solr.sh +++ b/plugins/php/versions/73/solr.sh @@ -66,7 +66,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/swoole.sh b/plugins/php/versions/73/swoole.sh index 46a981273..9d86a1171 100755 --- a/plugins/php/versions/73/swoole.sh +++ b/plugins/php/versions/73/swoole.sh @@ -73,7 +73,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -96,7 +96,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/xdebug.sh b/plugins/php/versions/73/xdebug.sh index e610af9f6..7355cf3d3 100755 --- a/plugins/php/versions/73/xdebug.sh +++ b/plugins/php/versions/73/xdebug.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/xhprof.sh b/plugins/php/versions/73/xhprof.sh index 759081253..6c64c6d5f 100755 --- a/plugins/php/versions/73/xhprof.sh +++ b/plugins/php/versions/73/xhprof.sh @@ -66,7 +66,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/yac.sh b/plugins/php/versions/73/yac.sh index 995a4f9a1..d1fb22520 100755 --- a/plugins/php/versions/73/yac.sh +++ b/plugins/php/versions/73/yac.sh @@ -64,7 +64,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/yaf.sh b/plugins/php/versions/73/yaf.sh index 4c7742f87..72ab38df2 100755 --- a/plugins/php/versions/73/yaf.sh +++ b/plugins/php/versions/73/yaf.sh @@ -61,7 +61,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -85,7 +85,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/yar.sh b/plugins/php/versions/73/yar.sh index 02fc1d2f6..7e48bea34 100755 --- a/plugins/php/versions/73/yar.sh +++ b/plugins/php/versions/73/yar.sh @@ -65,7 +65,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/zip.sh b/plugins/php/versions/73/zip.sh index ab58ab823..4606559ba 100755 --- a/plugins/php/versions/73/zip.sh +++ b/plugins/php/versions/73/zip.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/73/zlib.sh b/plugins/php/versions/73/zlib.sh index 030733cb3..becdb182d 100755 --- a/plugins/php/versions/73/zlib.sh +++ b/plugins/php/versions/73/zlib.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -88,7 +88,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/exif.sh b/plugins/php/versions/74/exif.sh index f52c194c5..7f02ce13b 100755 --- a/plugins/php/versions/74/exif.sh +++ b/plugins/php/versions/74/exif.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/fileinfo.sh b/plugins/php/versions/74/fileinfo.sh index 6966d6aaa..193f44b2e 100755 --- a/plugins/php/versions/74/fileinfo.sh +++ b/plugins/php/versions/74/fileinfo.sh @@ -66,7 +66,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/gd.sh b/plugins/php/versions/74/gd.sh index b20f69ba2..f4939fe7e 100755 --- a/plugins/php/versions/74/gd.sh +++ b/plugins/php/versions/74/gd.sh @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/imagemagick.sh b/plugins/php/versions/74/imagemagick.sh index 7490287e6..6c9688423 100755 --- a/plugins/php/versions/74/imagemagick.sh +++ b/plugins/php/versions/74/imagemagick.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/intl.sh b/plugins/php/versions/74/intl.sh index a0374a4f0..480e003ba 100755 --- a/plugins/php/versions/74/intl.sh +++ b/plugins/php/versions/74/intl.sh @@ -64,7 +64,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/ioncube.sh b/plugins/php/versions/74/ioncube.sh index bcd8729ef..ef5440382 100755 --- a/plugins/php/versions/74/ioncube.sh +++ b/plugins/php/versions/74/ioncube.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/mcrypt.sh b/plugins/php/versions/74/mcrypt.sh index c65df5a28..d37a096b5 100755 --- a/plugins/php/versions/74/mcrypt.sh +++ b/plugins/php/versions/74/mcrypt.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/memcached.sh b/plugins/php/versions/74/memcached.sh index d58333bbf..7a31cee78 100755 --- a/plugins/php/versions/74/memcached.sh +++ b/plugins/php/versions/74/memcached.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -88,7 +88,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/mongodb.sh b/plugins/php/versions/74/mongodb.sh index d0f8c1a54..1441e172f 100755 --- a/plugins/php/versions/74/mongodb.sh +++ b/plugins/php/versions/74/mongodb.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/opcache.sh b/plugins/php/versions/74/opcache.sh index a8fe50112..d0994e3c7 100755 --- a/plugins/php/versions/74/opcache.sh +++ b/plugins/php/versions/74/opcache.sh @@ -44,7 +44,7 @@ Install_lib() echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -55,7 +55,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/openssl.sh b/plugins/php/versions/74/openssl.sh index 17950eef8..bdd1323e5 100755 --- a/plugins/php/versions/74/openssl.sh +++ b/plugins/php/versions/74/openssl.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/pcntl.sh b/plugins/php/versions/74/pcntl.sh index 4a458ef2a..796b84897 100755 --- a/plugins/php/versions/74/pcntl.sh +++ b/plugins/php/versions/74/pcntl.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/redis.sh b/plugins/php/versions/74/redis.sh index 2133fd31f..5e7616828 100755 --- a/plugins/php/versions/74/redis.sh +++ b/plugins/php/versions/74/redis.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/seaslog.sh b/plugins/php/versions/74/seaslog.sh index 7146787e9..51a6e43c6 100755 --- a/plugins/php/versions/74/seaslog.sh +++ b/plugins/php/versions/74/seaslog.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/solr.sh b/plugins/php/versions/74/solr.sh index f53e2c54f..b6fcb1250 100755 --- a/plugins/php/versions/74/solr.sh +++ b/plugins/php/versions/74/solr.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/swoole.sh b/plugins/php/versions/74/swoole.sh index 8d80d4d5f..abd4a3676 100755 --- a/plugins/php/versions/74/swoole.sh +++ b/plugins/php/versions/74/swoole.sh @@ -75,7 +75,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -98,7 +98,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/xdebug.sh b/plugins/php/versions/74/xdebug.sh index b8d00c3a0..92545ce59 100755 --- a/plugins/php/versions/74/xdebug.sh +++ b/plugins/php/versions/74/xdebug.sh @@ -62,7 +62,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -85,7 +85,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/xhprof.sh b/plugins/php/versions/74/xhprof.sh index e371ddc36..8751501bd 100755 --- a/plugins/php/versions/74/xhprof.sh +++ b/plugins/php/versions/74/xhprof.sh @@ -67,7 +67,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/yac.sh b/plugins/php/versions/74/yac.sh index 995a4f9a1..d1fb22520 100755 --- a/plugins/php/versions/74/yac.sh +++ b/plugins/php/versions/74/yac.sh @@ -64,7 +64,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/yaf.sh b/plugins/php/versions/74/yaf.sh index 4c7742f87..72ab38df2 100755 --- a/plugins/php/versions/74/yaf.sh +++ b/plugins/php/versions/74/yaf.sh @@ -61,7 +61,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -85,7 +85,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/yar.sh b/plugins/php/versions/74/yar.sh index fcf7118b3..bd7adc8b8 100755 --- a/plugins/php/versions/74/yar.sh +++ b/plugins/php/versions/74/yar.sh @@ -65,7 +65,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/zip.sh b/plugins/php/versions/74/zip.sh index ab58ab823..4606559ba 100755 --- a/plugins/php/versions/74/zip.sh +++ b/plugins/php/versions/74/zip.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/74/zlib.sh b/plugins/php/versions/74/zlib.sh index 030733cb3..becdb182d 100755 --- a/plugins/php/versions/74/zlib.sh +++ b/plugins/php/versions/74/zlib.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -88,7 +88,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/exif.sh b/plugins/php/versions/80/exif.sh index f52c194c5..7f02ce13b 100755 --- a/plugins/php/versions/80/exif.sh +++ b/plugins/php/versions/80/exif.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/fileinfo.sh b/plugins/php/versions/80/fileinfo.sh index 6966d6aaa..193f44b2e 100755 --- a/plugins/php/versions/80/fileinfo.sh +++ b/plugins/php/versions/80/fileinfo.sh @@ -66,7 +66,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/gd.sh b/plugins/php/versions/80/gd.sh index b20f69ba2..f4939fe7e 100755 --- a/plugins/php/versions/80/gd.sh +++ b/plugins/php/versions/80/gd.sh @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/imagemagick.sh b/plugins/php/versions/80/imagemagick.sh index 7490287e6..6c9688423 100755 --- a/plugins/php/versions/80/imagemagick.sh +++ b/plugins/php/versions/80/imagemagick.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/intl.sh b/plugins/php/versions/80/intl.sh index a0374a4f0..480e003ba 100755 --- a/plugins/php/versions/80/intl.sh +++ b/plugins/php/versions/80/intl.sh @@ -64,7 +64,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/mcrypt.sh b/plugins/php/versions/80/mcrypt.sh index c65df5a28..d37a096b5 100755 --- a/plugins/php/versions/80/mcrypt.sh +++ b/plugins/php/versions/80/mcrypt.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/memcached.sh b/plugins/php/versions/80/memcached.sh index 09085fb13..071742fae 100755 --- a/plugins/php/versions/80/memcached.sh +++ b/plugins/php/versions/80/memcached.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -88,7 +88,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/mongodb.sh b/plugins/php/versions/80/mongodb.sh index d0f8c1a54..1441e172f 100755 --- a/plugins/php/versions/80/mongodb.sh +++ b/plugins/php/versions/80/mongodb.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/opcache.sh b/plugins/php/versions/80/opcache.sh index 13b915da4..2836741a6 100755 --- a/plugins/php/versions/80/opcache.sh +++ b/plugins/php/versions/80/opcache.sh @@ -47,7 +47,7 @@ Install_lib() echo "opcache.jit_buffer_size=64M" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -58,7 +58,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/openssl.sh b/plugins/php/versions/80/openssl.sh index 17950eef8..bdd1323e5 100755 --- a/plugins/php/versions/80/openssl.sh +++ b/plugins/php/versions/80/openssl.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/pcntl.sh b/plugins/php/versions/80/pcntl.sh index 4a458ef2a..796b84897 100755 --- a/plugins/php/versions/80/pcntl.sh +++ b/plugins/php/versions/80/pcntl.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/redis.sh b/plugins/php/versions/80/redis.sh index 6a30255ea..cb1eb9ac6 100755 --- a/plugins/php/versions/80/redis.sh +++ b/plugins/php/versions/80/redis.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/seaslog.sh b/plugins/php/versions/80/seaslog.sh index 0998a8385..5a685f1e3 100755 --- a/plugins/php/versions/80/seaslog.sh +++ b/plugins/php/versions/80/seaslog.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/solr.sh b/plugins/php/versions/80/solr.sh index f53e2c54f..b6fcb1250 100755 --- a/plugins/php/versions/80/solr.sh +++ b/plugins/php/versions/80/solr.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/swoole.sh b/plugins/php/versions/80/swoole.sh index c3711d6ad..10085eced 100755 --- a/plugins/php/versions/80/swoole.sh +++ b/plugins/php/versions/80/swoole.sh @@ -74,7 +74,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -97,7 +97,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/xdebug.sh b/plugins/php/versions/80/xdebug.sh index 661f2dcca..902e1727b 100755 --- a/plugins/php/versions/80/xdebug.sh +++ b/plugins/php/versions/80/xdebug.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/xhprof.sh b/plugins/php/versions/80/xhprof.sh index 759081253..6c64c6d5f 100755 --- a/plugins/php/versions/80/xhprof.sh +++ b/plugins/php/versions/80/xhprof.sh @@ -66,7 +66,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/yac.sh b/plugins/php/versions/80/yac.sh index 995a4f9a1..d1fb22520 100755 --- a/plugins/php/versions/80/yac.sh +++ b/plugins/php/versions/80/yac.sh @@ -64,7 +64,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/yaf.sh b/plugins/php/versions/80/yaf.sh index f420ee14c..ef2a6b047 100755 --- a/plugins/php/versions/80/yaf.sh +++ b/plugins/php/versions/80/yaf.sh @@ -62,7 +62,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/yar.sh b/plugins/php/versions/80/yar.sh index 77ee0fa9f..b697cc354 100755 --- a/plugins/php/versions/80/yar.sh +++ b/plugins/php/versions/80/yar.sh @@ -65,7 +65,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/zip.sh b/plugins/php/versions/80/zip.sh index 172a42fd5..dc877acbe 100755 --- a/plugins/php/versions/80/zip.sh +++ b/plugins/php/versions/80/zip.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -88,7 +88,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/80/zlib.sh b/plugins/php/versions/80/zlib.sh index 030733cb3..becdb182d 100755 --- a/plugins/php/versions/80/zlib.sh +++ b/plugins/php/versions/80/zlib.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -88,7 +88,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/exif.sh b/plugins/php/versions/81/exif.sh index f52c194c5..7f02ce13b 100755 --- a/plugins/php/versions/81/exif.sh +++ b/plugins/php/versions/81/exif.sh @@ -68,7 +68,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/fileinfo.sh b/plugins/php/versions/81/fileinfo.sh index 6d1b09453..7b23e1913 100755 --- a/plugins/php/versions/81/fileinfo.sh +++ b/plugins/php/versions/81/fileinfo.sh @@ -73,7 +73,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -96,7 +96,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/gd.sh b/plugins/php/versions/81/gd.sh index b20f69ba2..f4939fe7e 100755 --- a/plugins/php/versions/81/gd.sh +++ b/plugins/php/versions/81/gd.sh @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/imagemagick.sh b/plugins/php/versions/81/imagemagick.sh index 7490287e6..6c9688423 100755 --- a/plugins/php/versions/81/imagemagick.sh +++ b/plugins/php/versions/81/imagemagick.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/intl.sh b/plugins/php/versions/81/intl.sh index c58d8741c..0450ac269 100755 --- a/plugins/php/versions/81/intl.sh +++ b/plugins/php/versions/81/intl.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/mcrypt.sh b/plugins/php/versions/81/mcrypt.sh index c65df5a28..d37a096b5 100755 --- a/plugins/php/versions/81/mcrypt.sh +++ b/plugins/php/versions/81/mcrypt.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -87,7 +87,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/memcached.sh b/plugins/php/versions/81/memcached.sh index 80a9d8426..2d5962c37 100755 --- a/plugins/php/versions/81/memcached.sh +++ b/plugins/php/versions/81/memcached.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/mongodb.sh b/plugins/php/versions/81/mongodb.sh index d0f8c1a54..1441e172f 100755 --- a/plugins/php/versions/81/mongodb.sh +++ b/plugins/php/versions/81/mongodb.sh @@ -60,7 +60,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -83,7 +83,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/opcache.sh b/plugins/php/versions/81/opcache.sh index ab0e20653..c4cf9df40 100755 --- a/plugins/php/versions/81/opcache.sh +++ b/plugins/php/versions/81/opcache.sh @@ -48,7 +48,7 @@ Install_lib() echo "opcache.jit_buffer_size=64M" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -59,7 +59,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/openssl.sh b/plugins/php/versions/81/openssl.sh index 165e01bd2..6b91a36ea 100755 --- a/plugins/php/versions/81/openssl.sh +++ b/plugins/php/versions/81/openssl.sh @@ -63,7 +63,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/pcntl.sh b/plugins/php/versions/81/pcntl.sh index 4a458ef2a..796b84897 100755 --- a/plugins/php/versions/81/pcntl.sh +++ b/plugins/php/versions/81/pcntl.sh @@ -59,7 +59,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -82,7 +82,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/redis.sh b/plugins/php/versions/81/redis.sh index 6c9359249..33d1147fb 100755 --- a/plugins/php/versions/81/redis.sh +++ b/plugins/php/versions/81/redis.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -85,7 +85,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/seaslog.sh b/plugins/php/versions/81/seaslog.sh index 0998a8385..5a685f1e3 100755 --- a/plugins/php/versions/81/seaslog.sh +++ b/plugins/php/versions/81/seaslog.sh @@ -67,7 +67,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -91,7 +91,7 @@ Uninstall_lib() sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/solr.sh b/plugins/php/versions/81/solr.sh index f53e2c54f..b6fcb1250 100755 --- a/plugins/php/versions/81/solr.sh +++ b/plugins/php/versions/81/solr.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/swoole.sh b/plugins/php/versions/81/swoole.sh index c3711d6ad..10085eced 100755 --- a/plugins/php/versions/81/swoole.sh +++ b/plugins/php/versions/81/swoole.sh @@ -74,7 +74,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -97,7 +97,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/xdebug.sh b/plugins/php/versions/81/xdebug.sh index 661f2dcca..902e1727b 100755 --- a/plugins/php/versions/81/xdebug.sh +++ b/plugins/php/versions/81/xdebug.sh @@ -61,7 +61,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -84,7 +84,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/xhprof.sh b/plugins/php/versions/81/xhprof.sh index 759081253..6c64c6d5f 100755 --- a/plugins/php/versions/81/xhprof.sh +++ b/plugins/php/versions/81/xhprof.sh @@ -66,7 +66,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -89,7 +89,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/yac.sh b/plugins/php/versions/81/yac.sh index 995a4f9a1..d1fb22520 100755 --- a/plugins/php/versions/81/yac.sh +++ b/plugins/php/versions/81/yac.sh @@ -64,7 +64,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/yaf.sh b/plugins/php/versions/81/yaf.sh index f420ee14c..ef2a6b047 100755 --- a/plugins/php/versions/81/yaf.sh +++ b/plugins/php/versions/81/yaf.sh @@ -62,7 +62,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -86,7 +86,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/yar.sh b/plugins/php/versions/81/yar.sh index 77ee0fa9f..b697cc354 100755 --- a/plugins/php/versions/81/yar.sh +++ b/plugins/php/versions/81/yar.sh @@ -65,7 +65,7 @@ Install_lib() echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -90,7 +90,7 @@ Uninstall_lib() sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/zip.sh b/plugins/php/versions/81/zip.sh index 172a42fd5..dc877acbe 100755 --- a/plugins/php/versions/81/zip.sh +++ b/plugins/php/versions/81/zip.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -88,7 +88,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } diff --git a/plugins/php/versions/81/zlib.sh b/plugins/php/versions/81/zlib.sh index 030733cb3..becdb182d 100755 --- a/plugins/php/versions/81/zlib.sh +++ b/plugins/php/versions/81/zlib.sh @@ -65,7 +65,7 @@ Install_lib() 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 + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===========================================================' echo 'successful!' } @@ -88,7 +88,7 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - $serverPath/php/init.d/php$version reload + bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '===============================================' echo 'successful!' } From 5d8c320b81516eecc8a15af4a8e18756bffe4112 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 18:54:19 +0800 Subject: [PATCH 109/263] Update index.py --- plugins/php/index.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index 010114d3e..5d81adbea 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -287,7 +287,14 @@ def start(version): def stop(version): - return phpOp(version, 'stop') + status = phpOp(version, 'stop') + + if version == '52': + file = initReplace(version) + data = mw.execShell(file + ' ' + 'stop') + if data[1] == '': + return 'ok' + return status def restart(version): From 715ff7346f495f2deab88b27a3bf5de1aa19c8fb Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 18:55:52 +0800 Subject: [PATCH 110/263] Update index.py --- plugins/php/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index 5d81adbea..ed5d3f46f 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -292,8 +292,8 @@ def stop(version): if version == '52': file = initReplace(version) data = mw.execShell(file + ' ' + 'stop') - if data[1] == '': - return 'ok' + if data[1] == '': + return 'ok' return status From f2e980f3518b47e32d332eb8d7469da696c4397c Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 20:12:55 +0800 Subject: [PATCH 111/263] add opensuse --- scripts/install/opensuse.sh | 34 ++++++++++++++++++++++++++++++++++ scripts/install_dev.sh | 5 +++-- 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 scripts/install/opensuse.sh diff --git a/scripts/install/opensuse.sh b/scripts/install/opensuse.sh new file mode 100644 index 000000000..1f0f017d9 --- /dev/null +++ b/scripts/install/opensuse.sh @@ -0,0 +1,34 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH +LANG=en_US.UTF-8 + +# zypper refresh + + +# systemctl stop SuSEfirewall2 + + + +cd /www/server/mdserver-web/scripts && bash lib.sh +chmod 755 /www/server/mdserver-web/data + + +cd /www/server/mdserver-web && ./cli.sh start +isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` +n=0 +while [[ ! -f /etc/init.d/mw ]]; +do + echo -e ".\c" + sleep 1 + let n+=1 + if [ $n -gt 20 ];then + echo -e "start mw fail" + exit 1 + fi +done + +cd /www/server/mdserver-web && /etc/init.d/mw stop +cd /www/server/mdserver-web && /etc/init.d/mw start +cd /www/server/mdserver-web && /etc/init.d/mw default + diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 34a8d63ce..b85ed10b9 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -50,8 +50,9 @@ elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then OSNAME='ubuntu' apt install -y wget zip unzip -elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then - OSNAME='raspbian' +elif grep -Eqi "openSUSE" /etc/issue || grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' + zypper refresh else OSNAME='unknow' fi From 73ddcd1dc4b31832245f61e3b7e505574cf222d5 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 20:19:23 +0800 Subject: [PATCH 112/263] 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 b85ed10b9..805a2e828 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -50,7 +50,7 @@ elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then OSNAME='ubuntu' apt install -y wget zip unzip -elif grep -Eqi "openSUSE" /etc/issue || grep -Eq "openSUSE" /etc/*-release; then +elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' zypper refresh else From b3b218ad329df44bffd8c1f9083bb24f996dec7c Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 20:20:19 +0800 Subject: [PATCH 113/263] Update install_dev.sh --- scripts/install_dev.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 805a2e828..8ac42e207 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -30,6 +30,9 @@ fi if [ ${_os} == "Darwin" ]; then OSNAME='macos' +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' + zypper refresh elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip @@ -50,9 +53,6 @@ elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then OSNAME='ubuntu' apt install -y wget zip unzip -elif grep -Eq "openSUSE" /etc/*-release; then - OSNAME='opensuse' - zypper refresh else OSNAME='unknow' fi From 9823f9f58fce55b39fba483a898cbd44893e2c65 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 20:30:23 +0800 Subject: [PATCH 114/263] Update lib.sh --- scripts/lib.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/lib.sh b/scripts/lib.sh index 27acceac7..481eb04dd 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -231,6 +231,8 @@ fi _os=`uname` if [ ${_os} == "Darwin" ]; then OSNAME='macos' +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then From 24aa72dfffd89f0af5fc213c7877d7fd7a540582 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 20:43:02 +0800 Subject: [PATCH 115/263] up --- scripts/install/opensuse.sh | 4 ++++ scripts/lib.sh | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/install/opensuse.sh b/scripts/install/opensuse.sh index 1f0f017d9..3815a1b3c 100644 --- a/scripts/install/opensuse.sh +++ b/scripts/install/opensuse.sh @@ -9,6 +9,10 @@ LANG=en_US.UTF-8 # systemctl stop SuSEfirewall2 +zypper install -y openssl openssl-devel +zypper install -y make cmake gcc +zypper install -y python3-pip + cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data diff --git a/scripts/lib.sh b/scripts/lib.sh index 481eb04dd..1d4612e3c 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -327,7 +327,9 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y libmariadb-dev #apt install -y libmysqlclient-dev apt install -y libmariadb-dev-compat - #apt install -y libmariadbclient-dev + #apt install -y libmariadbclient-dev +elif [ "$OSNAME" == "opensuse" ];then + echo "opensuse lib" else yum install -y openldap openldap-devel libtirpc libtirpc-devel rpcgen From d038624e27f75b43e8420c9b02605017a79ca577 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 20:58:07 +0800 Subject: [PATCH 116/263] Update opensuse.sh --- scripts/install/opensuse.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/install/opensuse.sh b/scripts/install/opensuse.sh index 3815a1b3c..5d53d8780 100644 --- a/scripts/install/opensuse.sh +++ b/scripts/install/opensuse.sh @@ -8,11 +8,19 @@ LANG=en_US.UTF-8 # systemctl stop SuSEfirewall2 +# for debug +zypper install -y htop +# for debug end zypper install -y openssl openssl-devel -zypper install -y make cmake gcc +zypper install -y bison re2c make cmake gcc +zypper install -y autoconf zypper install -y python3-pip - +zypper install -y pcre pcre-devel +zypper install -y graphviz libxml2 libxml2-devel +zypper install -y curl curl-devel +zypper install -y freetype freetype-devel +zypper install -y mysql-devel cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data From ad76bb0bd2fa037a4344725e2026fe3ece6ff228 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 20:58:30 +0800 Subject: [PATCH 117/263] Update opensuse.sh --- scripts/install/opensuse.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install/opensuse.sh b/scripts/install/opensuse.sh index 5d53d8780..3dc051301 100644 --- a/scripts/install/opensuse.sh +++ b/scripts/install/opensuse.sh @@ -22,6 +22,8 @@ zypper install -y curl curl-devel zypper install -y freetype freetype-devel zypper install -y mysql-devel +zypper install -y ImageMagick ImageMagick-devel + cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data From 4990ba2c5a89557d966d46adb8d8b4c87f3a4faf Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 21:06:44 +0800 Subject: [PATCH 118/263] Update opensuse.sh --- scripts/install/opensuse.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install/opensuse.sh b/scripts/install/opensuse.sh index 3dc051301..95d0c83cf 100644 --- a/scripts/install/opensuse.sh +++ b/scripts/install/opensuse.sh @@ -13,7 +13,8 @@ zypper install -y htop # for debug end zypper install -y openssl openssl-devel -zypper install -y bison re2c make cmake gcc +zypper install -y bison re2c make cmake gcc +zypper install -y gcc-c++ zypper install -y autoconf zypper install -y python3-pip zypper install -y pcre pcre-devel From 27ad9abb54cb3691cdababeb9471abff221ff1e1 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 21:32:53 +0800 Subject: [PATCH 119/263] add --- class/core/config_api.py | 2 +- scripts/install/opensuse.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/class/core/config_api.py b/class/core/config_api.py index 6bca6fc85..8a76e50d1 100755 --- a/class/core/config_api.py +++ b/class/core/config_api.py @@ -18,7 +18,7 @@ class config_api: # 本版解决自启动问题 # 文件管理重命名 # 优化计划任务管理 - __version = '0.8.6.2' + __version = '0.8.6.3' def __init__(self): pass diff --git a/scripts/install/opensuse.sh b/scripts/install/opensuse.sh index 95d0c83cf..b66d32c57 100644 --- a/scripts/install/opensuse.sh +++ b/scripts/install/opensuse.sh @@ -22,8 +22,9 @@ zypper install -y graphviz libxml2 libxml2-devel zypper install -y curl curl-devel zypper install -y freetype freetype-devel zypper install -y mysql-devel - zypper install -y ImageMagick ImageMagick-devel +zypper install -y libjpeg-devel libpng-devel + cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data From ac5bea656e43e4216f9c63a78f7b1dd5d786003f Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 21:47:44 +0800 Subject: [PATCH 120/263] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/system_api.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/class/core/system_api.py b/class/core/system_api.py index f16705521..80ad6ae9e 100755 --- a/class/core/system_api.py +++ b/class/core/system_api.py @@ -243,13 +243,19 @@ class system_api: mac_version += x.split("\t")[1] + ' ' return mac_version - version = mw.readFile('/etc/redhat-release') - if not version: - version = mw.readFile( - '/etc/issue').strip().split("\n")[0].replace('\\n', '').replace('\l', '').strip() - else: + redhat_series = '/etc/redhat-release' + if os.path.exists(redhat_series): + version = mw.readFile('/etc/redhat-release') version = version.replace('release ', '').strip() - return version + return version + + os_series = '/etc/os-release' + if os.path.exists(os_series): + version = mw.execShell( + "cat /etc/*-release | grep PRETTY_NAME | awk -F = '{print $2}' | awk -F '\"' '{print $2}'") + return version[0].strip() + + return '未识别系统信息' def getBootTime(self): # 取系统启动时间 From 0713173c7b8df40b238caac06041c7f6249127e8 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 21:53:26 +0800 Subject: [PATCH 121/263] Update opensuse.sh --- scripts/install/opensuse.sh | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/scripts/install/opensuse.sh b/scripts/install/opensuse.sh index b66d32c57..5347b3dca 100644 --- a/scripts/install/opensuse.sh +++ b/scripts/install/opensuse.sh @@ -25,6 +25,54 @@ zypper install -y mysql-devel zypper install -y ImageMagick ImageMagick-devel zypper install -y libjpeg-devel libpng-devel +#https need +if [ ! -d /root/.acme.sh ];then + curl https://get.acme.sh | sh +fi + +if [ -f /etc/init.d/iptables ];then + + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT + # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT + # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT + service iptables save + + iptables_status=`service iptables status | grep 'not running'` + if [ "${iptables_status}" == '' ];then + service iptables restart + fi + + #安装时不开启 + service iptables stop +fi + + +if [ ! -f /etc/init.d/iptables ];then + yum install firewalld -y + systemctl enable firewalld + systemctl start firewalld + + firewall-cmd --permanent --zone=public --add-port=22/tcp + firewall-cmd --permanent --zone=public --add-port=80/tcp + firewall-cmd --permanent --zone=public --add-port=443/tcp + firewall-cmd --permanent --zone=public --add-port=888/tcp + firewall-cmd --permanent --zone=public --add-port=7200/tcp + # firewall-cmd --permanent --zone=public --add-port=3306/tcp + # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp + + + sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf + firewall-cmd --reload + #安装时不开启 + systemctl stop firewalld +fi + + + cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data From 0f9f5a6e0d8dacb23ffe842c98f775b5d50783ec Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 21:57:30 +0800 Subject: [PATCH 122/263] Update update_dev.sh --- scripts/update_dev.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index 6dd33232f..ccea81fd4 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -25,6 +25,9 @@ fi if [ ${_os} == "Darwin" ]; then OSNAME='macos' +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' + zypper refresh elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip From 31049ce9e5219b4dae207c6b460cf2b12a79771c Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 22:02:17 +0800 Subject: [PATCH 123/263] Update index.py --- plugins/openresty/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index 5958f2c47..28c818722 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -174,7 +174,7 @@ def initDreplace(): confReplace() # systemd - systemDir = '/lib/systemd/system' + systemDir = '/usr/lib/systemd/system' systemService = systemDir + '/openresty.service' systemServiceTpl = getPluginDir() + '/init.d/openresty.service.tpl' if os.path.exists(systemDir) and not os.path.exists(systemService): @@ -188,7 +188,7 @@ def initDreplace(): def status(): data = mw.execShell( - "ps -ef|grep nginx |grep -v grep | grep -v python | awk '{print $2}'") + "ps -ef|grep openresty |grep -v grep | grep -v python | awk '{print $2}'") if data[0] == '': return 'stop' return 'start' From 279a504029e5076396df0ea82c6f92991fc09045 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 22:05:24 +0800 Subject: [PATCH 124/263] Create opensuse.sh --- scripts/update/opensuse.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 scripts/update/opensuse.sh diff --git a/scripts/update/opensuse.sh b/scripts/update/opensuse.sh new file mode 100644 index 000000000..1f0f017d9 --- /dev/null +++ b/scripts/update/opensuse.sh @@ -0,0 +1,34 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH +LANG=en_US.UTF-8 + +# zypper refresh + + +# systemctl stop SuSEfirewall2 + + + +cd /www/server/mdserver-web/scripts && bash lib.sh +chmod 755 /www/server/mdserver-web/data + + +cd /www/server/mdserver-web && ./cli.sh start +isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` +n=0 +while [[ ! -f /etc/init.d/mw ]]; +do + echo -e ".\c" + sleep 1 + let n+=1 + if [ $n -gt 20 ];then + echo -e "start mw fail" + exit 1 + fi +done + +cd /www/server/mdserver-web && /etc/init.d/mw stop +cd /www/server/mdserver-web && /etc/init.d/mw start +cd /www/server/mdserver-web && /etc/init.d/mw default + From db19b02934b58eaaef9b0083a0454f9061116a8e Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 22:08:21 +0800 Subject: [PATCH 125/263] Update install.sh --- plugins/openresty/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index ffa8670c4..f4225a1a3 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -63,9 +63,9 @@ Install_openresty() Uninstall_openresty() { - if [ -f /lib/systemd/system/openresty.service ];then + if [ -f /usr/lib/systemd/system/openresty.service ];then systemctl stop openresty - rm -rf /lib/systemd/system/openresty.service + rm -rf /usr/systemd/system/openresty.service systemctl daemon-reload fi From 84993af35ab6a40fe7bf165aab3ddb216f8e36af Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 22:16:05 +0800 Subject: [PATCH 126/263] Update opensuse.sh --- scripts/install/opensuse.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/install/opensuse.sh b/scripts/install/opensuse.sh index 5347b3dca..c0d280747 100644 --- a/scripts/install/opensuse.sh +++ b/scripts/install/opensuse.sh @@ -25,6 +25,11 @@ zypper install -y mysql-devel zypper install -y ImageMagick ImageMagick-devel zypper install -y libjpeg-devel libpng-devel + +zypper install -y python3-devel +zypper install -y python-devel + + #https need if [ ! -d /root/.acme.sh ];then curl https://get.acme.sh | sh From 0d3a829b6dd504305bcceaf5e54f8c2b7d8594ca Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 22:17:45 +0800 Subject: [PATCH 127/263] up --- plugins/php/index.py | 2 +- plugins/php/install.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index ed5d3f46f..9c09647db 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -253,7 +253,7 @@ def initReplace(version): mw.execShell('chown -R www:www ' + upload_path) # systemd - systemDir = '/lib/systemd/system' + systemDir = '/usr/lib/systemd/system' systemService = systemDir + '/php' + version + '.service' systemServiceTpl = getPluginDir() + '/init.d/php.service.tpl' if os.path.exists(systemDir) and not os.path.exists(systemService): diff --git a/plugins/php/install.sh b/plugins/php/install.sh index 9393f0e31..07538d6ed 100755 --- a/plugins/php/install.sh +++ b/plugins/php/install.sh @@ -33,10 +33,10 @@ fi if [ "${action}" == "uninstall" ];then - if [ -f /lib/systemd/system/php${type}.service ];then + if [ -f /usr/lib/systemd/system/php${type}.service ];then systemctl stop php${type} systemctl disable php${type} - rm -rf /lib/systemd/system/php${type}.service + rm -rf /usr/lib/systemd/system/php${type}.service systemctl daemon-reload fi fi From eec656c278257e04a872bde4eb218778c5224cc5 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 22:22:03 +0800 Subject: [PATCH 128/263] =?UTF-8?q?system=E4=BD=8D=E7=BD=AE=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/gogs/index.py | 2 +- plugins/gogs/install.sh | 4 ++-- plugins/memcached/index.py | 2 +- plugins/memcached/install.sh | 4 ++-- plugins/mysql/index.py | 2 +- plugins/mysql/install.sh | 4 ++-- plugins/pureftp/index.py | 2 +- plugins/pureftp/install.sh | 4 ++-- plugins/redis/index.py | 2 +- plugins/redis/install.sh | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/plugins/gogs/index.py b/plugins/gogs/index.py index f909297f2..1340a8d57 100755 --- a/plugins/gogs/index.py +++ b/plugins/gogs/index.py @@ -157,7 +157,7 @@ def initDreplace(): # mw.writeFile(conf_bin, content) # systemd - systemDir = '/lib/systemd/system' + systemDir = '/usr/lib/systemd/system' systemService = systemDir + '/gogs.service' systemServiceTpl = getPluginDir() + '/init.d/gogs.service.tpl' if os.path.exists(systemDir) and not os.path.exists(systemService): diff --git a/plugins/gogs/install.sh b/plugins/gogs/install.sh index f06e8f857..acaf61078 100755 --- a/plugins/gogs/install.sh +++ b/plugins/gogs/install.sh @@ -79,10 +79,10 @@ Install_gogs() Uninstall_gogs() { - if [ -f /lib/systemd/system/gogs.service ];then + if [ -f /usr/lib/systemd/system/gogs.service ];then systemctl stop gogs systemctl disable gogs - rm -rf /lib/systemd/system/gogs.service + rm -rf /usr/lib/systemd/system/gogs.service systemctl daemon-reload fi diff --git a/plugins/memcached/index.py b/plugins/memcached/index.py index b3bf5fbaa..3680952d7 100755 --- a/plugins/memcached/index.py +++ b/plugins/memcached/index.py @@ -104,7 +104,7 @@ def initDreplace(): mw.execShell('chmod +x ' + file_bin) # systemd - systemDir = '/lib/systemd/system' + systemDir = '/usr/lib/systemd/system' systemService = systemDir + '/memcached.service' systemServiceTpl = getPluginDir() + '/init.d/memcached.service.tpl' if os.path.exists(systemDir) and not os.path.exists(systemService): diff --git a/plugins/memcached/install.sh b/plugins/memcached/install.sh index fad5f22cc..0011946ea 100755 --- a/plugins/memcached/install.sh +++ b/plugins/memcached/install.sh @@ -38,10 +38,10 @@ Install_mem(){ Uninstall_mem() { - if [ -f /lib/systemd/system/memcached.service ];then + if [ -f /usr/lib/systemd/system/memcached.service ];then systemctl stop memcached systemctl disable memcached - rm -rf /lib/systemd/system/memcached.service + rm -rf /usr/lib/systemd/system/memcached.service systemctl daemon-reload fi diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index b548e4e51..c066298a4 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -176,7 +176,7 @@ def initDreplace(version=''): mw.writeFile(mysql_conf, content) # systemd - systemDir = '/lib/systemd/system' + systemDir = '/usr/lib/systemd/system' systemService = systemDir + '/mysql.service' systemServiceTpl = getPluginDir() + '/init.d/mysql.service.tpl' if os.path.exists(systemDir) and not os.path.exists(systemService): diff --git a/plugins/mysql/install.sh b/plugins/mysql/install.sh index aa36df47e..69d99bcb0 100755 --- a/plugins/mysql/install.sh +++ b/plugins/mysql/install.sh @@ -26,10 +26,10 @@ fi if [ "${action}" == "uninstall" ];then - if [ -f /lib/systemd/system/mysql.service ];then + if [ -f /usr/lib/systemd/system/mysql.service ];then systemctl stop mysql systemctl disable mysql - rm -rf /lib/systemd/system/mysql.service + rm -rf /usr/lib/systemd/system/mysql.service systemctl daemon-reload fi fi diff --git a/plugins/pureftp/index.py b/plugins/pureftp/index.py index d54b245b5..1d729c31f 100755 --- a/plugins/pureftp/index.py +++ b/plugins/pureftp/index.py @@ -117,7 +117,7 @@ def initDreplace(): mw.writeFile(pureFtpdConfig, content) # systemd - systemDir = '/lib/systemd/system' + systemDir = '/usr/lib/systemd/system' systemService = systemDir + '/pureftp.service' systemServiceTpl = getPluginDir() + '/init.d/pureftp.service.tpl' diff --git a/plugins/pureftp/install.sh b/plugins/pureftp/install.sh index b314cc93b..83860e62c 100755 --- a/plugins/pureftp/install.sh +++ b/plugins/pureftp/install.sh @@ -88,10 +88,10 @@ Install_pureftp() Uninstall_pureftp() { - if [ -f /lib/systemd/system/pureftp.service ];then + if [ -f /usr/lib/systemd/system/pureftp.service ];then systemctl stop pureftp systemctl disable pureftp - rm -rf /lib/systemd/system/pureftp.service + rm -rf /usr/lib/systemd/system/pureftp.service systemctl daemon-reload fi diff --git a/plugins/redis/index.py b/plugins/redis/index.py index 5c57d2fef..4c9faf5d4 100755 --- a/plugins/redis/index.py +++ b/plugins/redis/index.py @@ -104,7 +104,7 @@ def initDreplace(): mw.writeFile(dst_conf_init, 'ok') # systemd - systemDir = '/lib/systemd/system' + systemDir = '/usr/lib/systemd/system' systemService = systemDir + '/redis.service' systemServiceTpl = getPluginDir() + '/init.d/redis.service.tpl' if os.path.exists(systemDir) and not os.path.exists(systemService): diff --git a/plugins/redis/install.sh b/plugins/redis/install.sh index d19ffd750..69fc64b3a 100755 --- a/plugins/redis/install.sh +++ b/plugins/redis/install.sh @@ -40,10 +40,10 @@ Install_redis() Uninstall_redis() { - if [ -f /lib/systemd/system/redis.service ];then + if [ -f /usr/lib/systemd/system/redis.service ];then systemctl stop redis systemctl disable redis - rm -rf /lib/systemd/system/redis.service + rm -rf /usr/lib/systemd/system/redis.service systemctl daemon-reload fi From 06d5427bb7957241903a96390915a182f217c448 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 22:23:25 +0800 Subject: [PATCH 129/263] up --- plugins/rsyncd/index.py | 2 +- plugins/rsyncd/install.sh | 4 ++-- plugins/sphinx/index.py | 2 +- plugins/sphinx/install.sh | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/rsyncd/index.py b/plugins/rsyncd/index.py index b19a570c9..f0f791177 100755 --- a/plugins/rsyncd/index.py +++ b/plugins/rsyncd/index.py @@ -126,7 +126,7 @@ def initDreplace(): mw.execShell('chmod +x ' + file_bin) # systemd - systemDir = '/lib/systemd/system' + systemDir = '/usr/lib/systemd/system' systemService = systemDir + '/rsyncd.service' systemServiceTpl = getPluginDir() + '/init.d/rsyncd.service.tpl' if os.path.exists(systemDir) and not os.path.exists(systemService): diff --git a/plugins/rsyncd/install.sh b/plugins/rsyncd/install.sh index a686ab695..f771a3514 100755 --- a/plugins/rsyncd/install.sh +++ b/plugins/rsyncd/install.sh @@ -24,10 +24,10 @@ Install_rsyncd() Uninstall_rsyncd() { - if [ -f /lib/systemd/system/rsyncd.service ];then + if [ -f /usr/lib/systemd/system/rsyncd.service ];then systemctl stop rsyncd systemctl disable rsyncd - rm -rf /lib/systemd/system/rsyncd.service + rm -rf /usr/lib/systemd/system/rsyncd.service systemctl daemon-reload fi diff --git a/plugins/sphinx/index.py b/plugins/sphinx/index.py index 676c97a06..2c88586ef 100755 --- a/plugins/sphinx/index.py +++ b/plugins/sphinx/index.py @@ -147,7 +147,7 @@ def initDreplace(): mw.writeFile(getServerDir() + '/sphinx.conf', conf_content) # systemd - systemDir = '/lib/systemd/system' + systemDir = '/usr/lib/systemd/system' systemService = systemDir + '/sphinx.service' systemServiceTpl = getPluginDir() + '/init.d/sphinx.service.tpl' if os.path.exists(systemDir) and not os.path.exists(systemService): diff --git a/plugins/sphinx/install.sh b/plugins/sphinx/install.sh index faa104dc3..49ca46742 100755 --- a/plugins/sphinx/install.sh +++ b/plugins/sphinx/install.sh @@ -66,10 +66,10 @@ Install_sphinx() Uninstall_sphinx() { - if [ -f /lib/systemd/system/sphinx.service ];then + if [ -f /usr/lib/systemd/system/sphinx.service ];then systemctl stop sphinx systemctl disable sphinx - rm -rf /lib/systemd/system/sphinx.service + rm -rf /usr/lib/systemd/system/sphinx.service systemctl daemon-reload fi From 5fe98deb3c5b4f099156c66f8275da393dd3095f Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 22:25:18 +0800 Subject: [PATCH 130/263] up --- plugins/supervisor/index.py | 2 +- plugins/supervisor/install.sh | 4 ++-- plugins/swap/index.py | 2 +- plugins/swap/install.sh | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/supervisor/index.py b/plugins/supervisor/index.py index cad9ca9dc..47ebd6128 100755 --- a/plugins/supervisor/index.py +++ b/plugins/supervisor/index.py @@ -171,7 +171,7 @@ def restart(): def reload(): - systemDir = '/lib/systemd/system' + systemDir = '/usr/lib/systemd/system' systemService = systemDir + '/supervisor.service' if os.path.exists(systemService): data = mw.execShell('systemctl reload supervisor') diff --git a/plugins/supervisor/install.sh b/plugins/supervisor/install.sh index b67b3f273..ce9f2d240 100755 --- a/plugins/supervisor/install.sh +++ b/plugins/supervisor/install.sh @@ -61,10 +61,10 @@ Uninstall_app() { - if [ -f /lib/systemd/system/supervisor.service ];then + if [ -f /usr/lib/systemd/system/supervisor.service ];then systemctl stop supervisor systemctl disable supervisor - rm -rf /lib/systemd/system/supervisor.service + rm -rf /usr/lib/systemd/system/supervisor.service systemctl daemon-reload fi diff --git a/plugins/swap/index.py b/plugins/swap/index.py index df5dc599f..efb1a207f 100755 --- a/plugins/swap/index.py +++ b/plugins/swap/index.py @@ -84,7 +84,7 @@ def initDreplace(): mw.execShell('chmod +x ' + file_bin) # systemd - systemDir = '/lib/systemd/system' + systemDir = '/usr/lib/systemd/system' systemService = systemDir + '/swap.service' systemServiceTpl = getPluginDir() + '/init.d/swap.service.tpl' if os.path.exists(systemDir) and not os.path.exists(systemService): diff --git a/plugins/swap/install.sh b/plugins/swap/install.sh index bdc5f06d6..321c69bf5 100755 --- a/plugins/swap/install.sh +++ b/plugins/swap/install.sh @@ -38,11 +38,11 @@ Uninstall_swap() { swapoff $serverPath/swap/swapfile - if [ -f /lib/systemd/system/swap.service ];then + if [ -f /usr/lib/systemd/system/swap.service ];then rm -rf /lib/systemd/system/swap.service fi - if [ -f /lib/systemd/system/swap.service ];then + if [ -f /usr/lib/systemd/system/swap.service ];then systemctl stop swap systemctl disable swap rm -rf /lib/systemd/system/swap.service From 15d892fafead095543ac062732a2c2a93aad66aa Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 22:33:56 +0800 Subject: [PATCH 131/263] Update update_dev.sh --- scripts/update_dev.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index ccea81fd4..1e0b9a1fb 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -14,12 +14,12 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then +if grep -Eq "Ubuntu" /etc/*-release; then ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi -if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then +if grep -Eq "Debian" /etc/*-release; then ln -sf /bin/bash /bin/sh fi From faa1fa531c8d3f17de55c72cb426d9ab142449be Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 22:42:29 +0800 Subject: [PATCH 132/263] Update install.sh --- plugins/memcached/install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/memcached/install.sh b/plugins/memcached/install.sh index 0011946ea..79e12d40d 100755 --- a/plugins/memcached/install.sh +++ b/plugins/memcached/install.sh @@ -14,6 +14,7 @@ VERSION=1.6.15 Install_mem(){ mkdir -p $serverPath/source + # mkdir -p $serverPath/memcached echo '正在安装脚本文件...' > $install_tmp if [ ! -f $serverPath/source/memcached.tar.gz ];then @@ -22,7 +23,7 @@ Install_mem(){ cd $serverPath/source && tar -zxvf memcached.tar.gz - mkdir -p $serverPath/memcached + echo "./configure --prefix=${serverPath}/memcached && make && make install" cd $serverPath/source/memcached-${VERSION} && ./configure --prefix=$serverPath/memcached && make && make install @@ -52,6 +53,8 @@ Uninstall_mem() } +# /www/server/memcached/bin/memcached -d -p 11211 -u root -m 100 -c 100 + action=$1 if [ "${1}" == 'install' ];then Install_mem From d17fd4adf60d97152d58e4d48706630636d08ede Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 22:46:20 +0800 Subject: [PATCH 133/263] up --- plugins/mysql/versions/5.5/install.sh | 1 + plugins/mysql/versions/5.6/install.sh | 1 + plugins/mysql/versions/5.7/install.sh | 1 + plugins/mysql/versions/8.0/install.sh | 1 + 4 files changed, 4 insertions(+) diff --git a/plugins/mysql/versions/5.5/install.sh b/plugins/mysql/versions/5.5/install.sh index eec5fc632..214caad21 100755 --- a/plugins/mysql/versions/5.5/install.sh +++ b/plugins/mysql/versions/5.5/install.sh @@ -66,6 +66,7 @@ Install_mysql() else rm -rf ${mysqlDir}/mysql-5.5.62 echo '安装失败' > $install_tmp + exit 1 fi fi } diff --git a/plugins/mysql/versions/5.6/install.sh b/plugins/mysql/versions/5.6/install.sh index 4d11114e9..85e594d51 100755 --- a/plugins/mysql/versions/5.6/install.sh +++ b/plugins/mysql/versions/5.6/install.sh @@ -83,6 +83,7 @@ Install_mysql() else rm -rf ${mysqlDir}/mysql-5.6.50 echo '安装失败' > $install_tmp + exit 1 fi fi } diff --git a/plugins/mysql/versions/5.7/install.sh b/plugins/mysql/versions/5.7/install.sh index 851cd656b..928b504d5 100755 --- a/plugins/mysql/versions/5.7/install.sh +++ b/plugins/mysql/versions/5.7/install.sh @@ -97,6 +97,7 @@ Install_mysql() else rm -rf ${mysqlDir}/mysql-${VERSION} echo '安装失败' > $install_tmp + exit 1 fi fi } diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index f892ad1d9..68a0537e9 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -97,6 +97,7 @@ Install_mysql() else rm -rf ${mysqlDir}/mysql-8.0.25 echo '安装失败' > $install_tmp + exit 1 fi fi } From 78111ee386f9af3878796651d19d44b8db1c9bb5 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 23:01:37 +0800 Subject: [PATCH 134/263] up --- plugins/mongodb/install.sh | 43 +++++++++++++++++++++++++++++++++++-- scripts/install/opensuse.sh | 3 ++- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh index 6e71c4239..49878b4b3 100755 --- a/plugins/mongodb/install.sh +++ b/plugins/mongodb/install.sh @@ -18,6 +18,8 @@ echo "use system: ${sysName}" if [ ${sysName} == "Darwin" ]; then OSNAME='macos' +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then @@ -57,7 +59,7 @@ if [ "$SYS_VERSION_ID" == "22" ]; then fi -if [ -f /lib/systemd/system/mongod.service ];then +if [ -f /usr/lib/systemd/system/mongod.service ];then echo 'alreay exist!' exit 0 fi @@ -94,7 +96,7 @@ if [ "$SYS_VERSION_ID" -ge "11" ]; then fi -if [ -f /lib/systemd/system/mongod.service ];then +if [ -f /usr/lib/systemd/system/mongod.service ];then echo 'alreay exist!' exit 0 fi @@ -130,6 +132,39 @@ rm -r /var/lib/mongodb } +Install_Linux_Opensuse() +{ +##################### opensuse start ##################### +if [ "$SYS_VERSION_ID" -gt "15" ]; then + echo "Not yet supported" + exit 1 +fi + + +if [ -f /usr/lib/systemd/system/mongod.service ];then + echo 'alreay exist!' + exit 0 +fi + +rpm --import https://www.mongodb.org/static/pgp/server-${VERSION}.asc +zypper addrepo --gpgcheck "https://repo.mongodb.org/zypper/suse/15/mongodb-org/${VERSION}/x86_64/" mongodb +zypper -n install mongodb-org +# zypper install mongodb-org-4.4.15 mongodb-org-server-4.4.15 mongodb-org-shell-4.4.15 mongodb-org-mongos-4.4.15 mongodb-org-tools-4.4.15 + + +##################### opensuse end ##################### +} + + +Uninstall_Linux_Opensuse() +{ +systemctl stop mongod +zypper remove -y $(rpm -qa | grep mongodb-org) +rm -r /var/log/mongodb +rm -r /var/lib/mongo +} + + # https://repo.mongodb.org/yum/redhat/7/mongodb-org/5.0/x86_64/RPMS/mongodb-org-server-5.0.4-1.el7.x86_64.rpm @@ -153,6 +188,8 @@ Install_app_linux() Install_Linux_Debian elif [ "$OSNAME" == "centos" ];then Install_Linux_CentOS + elif [ "$OSNAME" == "opensuse" ];then + Install_Linux_Opensuse else echo "Not yet supported" exit 1 @@ -191,6 +228,8 @@ elif [ "$OSNAME" == "debian" ];then Unstall_Linux_Debian elif [ "$OSNAME" == "centos" ];then Install_Linux_CentOS +elif [ "$OSNAME" == "opensuse" ];then + Uninstall_Linux_Opensuse else echo "ok" fi diff --git a/scripts/install/opensuse.sh b/scripts/install/opensuse.sh index c0d280747..c0446ed34 100644 --- a/scripts/install/opensuse.sh +++ b/scripts/install/opensuse.sh @@ -24,7 +24,8 @@ zypper install -y freetype freetype-devel zypper install -y mysql-devel zypper install -y ImageMagick ImageMagick-devel zypper install -y libjpeg-devel libpng-devel - +zypper install -y libevent-devel +zypper install -y libtirpc-devel zypper install -y python3-devel zypper install -y python-devel From d7b61c4c3b525e42e9df7e65956238f159c81ab4 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 23:03:54 +0800 Subject: [PATCH 135/263] Update install_dev.sh --- scripts/install_dev.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 8ac42e207..a68b29024 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -18,12 +18,12 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then +if grep -Eq "Ubuntu" /etc/*-release; then ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi -if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then +if grep -Eq "Debian" /etc/*-release; then ln -sf /bin/bash /bin/sh fi From 4c57d53d1e0090aca2e4f98c552b2d76c1d12383 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 23:04:50 +0800 Subject: [PATCH 136/263] up --- scripts/install.sh | 10 +++++----- scripts/install_cn.sh | 10 +++++----- scripts/update.sh | 7 +++++-- scripts/update_cn.sh | 7 +++++-- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 0199bf0e8..c923ed805 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -18,18 +18,21 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then +if grep -Eq "Ubuntu" /etc/*-release; then ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi -if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then +if grep -Eq "Debian" /etc/*-release; then ln -sf /bin/bash /bin/sh fi if [ ${_os} == "Darwin" ]; then OSNAME='macos' +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' + zypper refresh elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip @@ -47,12 +50,9 @@ elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then apt update -y apt install -y devscripts apt install -y wget zip unzip - apt install -y wget zip unzip elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then OSNAME='ubuntu' apt install -y wget zip unzip -elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then - OSNAME='raspbian' else OSNAME='unknow' fi diff --git a/scripts/install_cn.sh b/scripts/install_cn.sh index afb57ab25..04f8c18aa 100755 --- a/scripts/install_cn.sh +++ b/scripts/install_cn.sh @@ -18,18 +18,21 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then +if grep -Eq "Ubuntu" /etc/*-release; then ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi -if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then +if grep -Eq "Debian" /etc/*-release; then ln -sf /bin/bash /bin/sh fi if [ ${_os} == "Darwin" ]; then OSNAME='macos' +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' + zypper refresh elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip @@ -47,12 +50,9 @@ elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then apt update -y apt install -y devscripts apt install -y wget zip unzip - apt install -y wget zip unzip elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then OSNAME='ubuntu' apt install -y wget zip unzip -elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then - OSNAME='raspbian' else OSNAME='unknow' fi diff --git a/scripts/update.sh b/scripts/update.sh index 016ad88a8..2435a6778 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -14,17 +14,20 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then +if grep -Eq "Ubuntu" /etc/*-release; then ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi -if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then +if grep -Eq "Debian" /etc/*-release; then ln -sf /bin/bash /bin/sh fi if [ ${_os} == "Darwin" ]; then OSNAME='macos' +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' + zypper refresh elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip diff --git a/scripts/update_cn.sh b/scripts/update_cn.sh index 8e20424d0..6e44bccfe 100755 --- a/scripts/update_cn.sh +++ b/scripts/update_cn.sh @@ -14,17 +14,20 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then +if grep -Eq "Ubuntu" /etc/*-release; then ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi -if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then +if grep -Eq "Debian" /etc/*-release; then ln -sf /bin/bash /bin/sh fi if [ ${_os} == "Darwin" ]; then OSNAME='macos' +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' + zypper refresh elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip From 99a0934ebe7ac602297be78273dba714570b61e8 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 23:18:25 +0800 Subject: [PATCH 137/263] =?UTF-8?q?ubuntu=20=E4=B8=89=E4=B8=AA=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/python-app-mysql56.yml | 2 +- .github/workflows/python-app-mysql57.yml | 2 +- .github/workflows/python-app-mysql80.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app-mysql56.yml b/.github/workflows/python-app-mysql56.yml index 4a3503415..41c8b7171 100644 --- a/.github/workflows/python-app-mysql56.yml +++ b/.github/workflows/python-app-mysql56.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 diff --git a/.github/workflows/python-app-mysql57.yml b/.github/workflows/python-app-mysql57.yml index b52612299..45d52ff53 100644 --- a/.github/workflows/python-app-mysql57.yml +++ b/.github/workflows/python-app-mysql57.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 diff --git a/.github/workflows/python-app-mysql80.yml b/.github/workflows/python-app-mysql80.yml index ab89330b0..d54ed1d5f 100644 --- a/.github/workflows/python-app-mysql80.yml +++ b/.github/workflows/python-app-mysql80.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 f1d65933dffd256dc453bb640f951be551b5b313 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 23:26:21 +0800 Subject: [PATCH 138/263] Update install.sh --- plugins/varnish/install.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/plugins/varnish/install.sh b/plugins/varnish/install.sh index 0d8a80c42..58426eaed 100755 --- a/plugins/varnish/install.sh +++ b/plugins/varnish/install.sh @@ -15,16 +15,16 @@ VERSION=$2 _os=`uname` if [ ${_os} == "Darwin" ]; then OSNAME='macos' -elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' +elif grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' -elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then +elif grep -Eq "Fedora" /etc/*-release; then OSNAME='fedora' -elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then +elif grep -Eq "Debian" /etc/*-release; then OSNAME='debian' -elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then +elif grep -Eq "Ubuntu" /etc/*-release; then OSNAME='ubuntu' -elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then - OSNAME='raspbian' else OSNAME='unknow' fi @@ -39,7 +39,9 @@ Install_varnish() elif [ ${OSNAME} == "centos" ]; then yum install varnish -y elif [ ${OSNAME} == "debian" ] || [ ${OSNAME} == "ubuntu" ]; then - apt-get install varnish -y + apt install varnish -y + elif [ ${OSNAME} == "opensuse" ];then + zypper install -y varnish else echo "I won't support it" fi From db03ca1c735acd4cc8390f94322ab76237778d7c Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 23:35:58 +0800 Subject: [PATCH 139/263] Update opensuse.sh --- scripts/install/opensuse.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install/opensuse.sh b/scripts/install/opensuse.sh index c0446ed34..443a067d2 100644 --- a/scripts/install/opensuse.sh +++ b/scripts/install/opensuse.sh @@ -26,6 +26,8 @@ zypper install -y ImageMagick ImageMagick-devel zypper install -y libjpeg-devel libpng-devel zypper install -y libevent-devel zypper install -y libtirpc-devel +zypper install -y rpcgen + zypper install -y python3-devel zypper install -y python-devel From dfff0aabad76cc8a90a0fdb6a48a710c0abe6691 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 23:59:24 +0800 Subject: [PATCH 140/263] Update debug.sh --- scripts/quick/debug.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/quick/debug.sh b/scripts/quick/debug.sh index a23015b50..d8855d5ec 100755 --- a/scripts/quick/debug.sh +++ b/scripts/quick/debug.sh @@ -24,7 +24,7 @@ fi -PHP_VER_LIST=(52 53 54 55 56 70 71 72 73 74 80 81) +PHP_VER_LIST=(53 54 55 56 70 71 72 73 74 80 81) # PHP_VER_LIST=(81) for PHP_VER in ${PHP_VER_LIST[@]}; do echo "php${PHP_VER} -- start" From 5de4b94c3fa2072762c07d6b813da2f6e37c5af7 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 00:16:37 +0800 Subject: [PATCH 141/263] up --- plugins/php/versions/lib.sh | 3 ++- scripts/install/opensuse.sh | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/php/versions/lib.sh b/plugins/php/versions/lib.sh index 968a3ead1..5702d47ed 100644 --- a/plugins/php/versions/lib.sh +++ b/plugins/php/versions/lib.sh @@ -6,7 +6,6 @@ curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") version=$1 @@ -14,6 +13,8 @@ action=$2 if [ -f /lib/systemd/system/php${version}.service ];then systemctl ${action} php${version} +elif [[ -f /usr/lib/systemd/system/php${version}.service ]]; then + systemctl ${action} php${version} else $serverPath/php/init.d/php${version} ${action} fi \ No newline at end of file diff --git a/scripts/install/opensuse.sh b/scripts/install/opensuse.sh index 443a067d2..a1a6d17f4 100644 --- a/scripts/install/opensuse.sh +++ b/scripts/install/opensuse.sh @@ -28,6 +28,11 @@ zypper install -y libevent-devel zypper install -y libtirpc-devel zypper install -y rpcgen +zypper install -y libmemcached libmemcached-devel + + +# zypper install -y protobuf +# zypper install -y zlib-devel zypper install -y python3-devel zypper install -y python-devel From eb56766a2feb39777bbb5da62532ae313baee24b Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 00:26:05 +0800 Subject: [PATCH 142/263] Update opensuse.sh --- scripts/install/opensuse.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/opensuse.sh b/scripts/install/opensuse.sh index a1a6d17f4..fa1193fe5 100644 --- a/scripts/install/opensuse.sh +++ b/scripts/install/opensuse.sh @@ -65,7 +65,7 @@ fi if [ ! -f /etc/init.d/iptables ];then - yum install firewalld -y + zypper install -y firewalld systemctl enable firewalld systemctl start firewalld From f9c1892765f0d891ec4ef71813a9ed6a124de098 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 00:55:58 +0800 Subject: [PATCH 143/263] add archlinux --- scripts/install/arch.sh | 37 +++++++++++++++++++++++++++++++++++++ scripts/install_dev.sh | 2 ++ scripts/update/arch.sh | 34 ++++++++++++++++++++++++++++++++++ scripts/update_dev.sh | 2 ++ 4 files changed, 75 insertions(+) create mode 100644 scripts/install/arch.sh create mode 100644 scripts/update/arch.sh diff --git a/scripts/install/arch.sh b/scripts/install/arch.sh new file mode 100644 index 000000000..cd28407ec --- /dev/null +++ b/scripts/install/arch.sh @@ -0,0 +1,37 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH +LANG=en_US.UTF-8 + + + +echo y | pacman -Sy yaourt +echo y | pacman -Sy python3 + + + + + + + +cd /www/server/mdserver-web/scripts && bash lib.sh +chmod 755 /www/server/mdserver-web/data + + +cd /www/server/mdserver-web && ./cli.sh start +isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` +n=0 +while [[ ! -f /etc/init.d/mw ]]; +do + echo -e ".\c" + sleep 1 + let n+=1 + if [ $n -gt 20 ];then + echo -e "start mw fail" + exit 1 + fi +done + +cd /www/server/mdserver-web && /etc/init.d/mw stop +cd /www/server/mdserver-web && /etc/init.d/mw start +cd /www/server/mdserver-web && /etc/init.d/mw default \ No newline at end of file diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index a68b29024..27b8353dd 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -33,6 +33,8 @@ if [ ${_os} == "Darwin" ]; then elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' zypper refresh +elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then + OSNAME='arch' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip diff --git a/scripts/update/arch.sh b/scripts/update/arch.sh new file mode 100644 index 000000000..a7fda8afe --- /dev/null +++ b/scripts/update/arch.sh @@ -0,0 +1,34 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH +LANG=en_US.UTF-8 + + + +# echo y | pacman -Sy yaourt +# echo y | pacman -Sy python3 + + + + +cd /www/server/mdserver-web/scripts && bash lib.sh +chmod 755 /www/server/mdserver-web/data + + +cd /www/server/mdserver-web && ./cli.sh start +isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` +n=0 +while [[ ! -f /etc/init.d/mw ]]; +do + echo -e ".\c" + sleep 1 + let n+=1 + if [ $n -gt 20 ];then + echo -e "start mw fail" + exit 1 + fi +done + +cd /www/server/mdserver-web && /etc/init.d/mw stop +cd /www/server/mdserver-web && /etc/init.d/mw start +cd /www/server/mdserver-web && /etc/init.d/mw default \ No newline at end of file diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index 1e0b9a1fb..b8a558dbc 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -28,6 +28,8 @@ if [ ${_os} == "Darwin" ]; then elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' zypper refresh +elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then + OSNAME='arch' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip From 206b5d65156c5b17b0473da60c880aa729fd6635 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 00:59:46 +0800 Subject: [PATCH 144/263] Update install_dev.sh --- scripts/install_dev.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 27b8353dd..c81f1f5c4 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -35,6 +35,7 @@ elif grep -Eq "openSUSE" /etc/*-release; then zypper refresh elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then OSNAME='arch' + echo y | pacman -Sy unzip elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip From c48c7d7020e188705ffb367eb2e20c9a83a1ef50 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 01:01:29 +0800 Subject: [PATCH 145/263] Update lib.sh --- scripts/lib.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/lib.sh b/scripts/lib.sh index 1d4612e3c..3c89f4984 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -222,8 +222,7 @@ echo -e "Install_Curl" >> ${libPath}/lib.pl } - -if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then +if grep -Eq "Ubuntu" /etc/*-release; then sudo ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi @@ -233,6 +232,8 @@ if [ ${_os} == "Darwin" ]; then OSNAME='macos' elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' +elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then + OSNAME='arch' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then @@ -268,7 +269,10 @@ if [ "$OSNAME" == "macos" ]; then brew install freetype brew install openssl brew install libzip - +elif [ "$OSNAME" == "opensuse" ];then + echo "opensuse lib" +elif [ "$OSNAME" == "arch" ];then + echo "arch lib" elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y devscripts @@ -328,8 +332,6 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then #apt install -y libmysqlclient-dev apt install -y libmariadb-dev-compat #apt install -y libmariadbclient-dev -elif [ "$OSNAME" == "opensuse" ];then - echo "opensuse lib" else yum install -y openldap openldap-devel libtirpc libtirpc-devel rpcgen From 6002e14698a09722c7307fc6c58529d5b152286a Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 01:05:05 +0800 Subject: [PATCH 146/263] Update arch.sh --- scripts/install/arch.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install/arch.sh b/scripts/install/arch.sh index cd28407ec..e242175c4 100644 --- a/scripts/install/arch.sh +++ b/scripts/install/arch.sh @@ -7,6 +7,8 @@ LANG=en_US.UTF-8 echo y | pacman -Sy yaourt echo y | pacman -Sy python3 +echo y | pacman -Sy lsof +echo y | pacman -Sy python-pip From 8a714b84c2de02b3d47a328c977d756a6c0d19e8 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 01:10:59 +0800 Subject: [PATCH 147/263] Update arch.sh --- scripts/install/arch.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/install/arch.sh b/scripts/install/arch.sh index e242175c4..f7a2dde7b 100644 --- a/scripts/install/arch.sh +++ b/scripts/install/arch.sh @@ -6,11 +6,13 @@ LANG=en_US.UTF-8 echo y | pacman -Sy yaourt + +echo y | pacman -Sy gcc make cmake autoconf echo y | pacman -Sy python3 echo y | pacman -Sy lsof echo y | pacman -Sy python-pip - +echo y | pacman -Sy mysql-dev From e7a10d356a54851541d9ee3238289c7ce2a51719 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 01:16:01 +0800 Subject: [PATCH 148/263] Update arch.sh --- scripts/install/arch.sh | 47 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/scripts/install/arch.sh b/scripts/install/arch.sh index f7a2dde7b..b37ab512e 100644 --- a/scripts/install/arch.sh +++ b/scripts/install/arch.sh @@ -12,10 +12,55 @@ echo y | pacman -Sy python3 echo y | pacman -Sy lsof echo y | pacman -Sy python-pip -echo y | pacman -Sy mysql-dev +# echo y | pacman -Sy rpcgen +# echo y | pacman -Sy mysql-dev +#https need +if [ ! -d /root/.acme.sh ];then + curl https://get.acme.sh | sh +fi +if [ -f /etc/init.d/iptables ];then + + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT + # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT + # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT + service iptables save + + iptables_status=`service iptables status | grep 'not running'` + if [ "${iptables_status}" == '' ];then + service iptables restart + fi + + #安装时不开启 + service iptables stop +fi + + +if [ ! -f /etc/init.d/iptables ];then + echo y | pacman -Sy firewalld + systemctl enable firewalld + systemctl start firewalld + + firewall-cmd --permanent --zone=public --add-port=22/tcp + firewall-cmd --permanent --zone=public --add-port=80/tcp + firewall-cmd --permanent --zone=public --add-port=443/tcp + firewall-cmd --permanent --zone=public --add-port=888/tcp + firewall-cmd --permanent --zone=public --add-port=7200/tcp + # firewall-cmd --permanent --zone=public --add-port=3306/tcp + # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp + + + sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf + firewall-cmd --reload + #安装时不开启 + systemctl stop firewalld +fi cd /www/server/mdserver-web/scripts && bash lib.sh From 520c931a10455823251b8a319ce1ac8e9c9530ed Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 01:42:15 +0800 Subject: [PATCH 149/263] Update arch.sh --- scripts/install/arch.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/install/arch.sh b/scripts/install/arch.sh index b37ab512e..cbcb2ff00 100644 --- a/scripts/install/arch.sh +++ b/scripts/install/arch.sh @@ -11,11 +11,27 @@ echo y | pacman -Sy gcc make cmake autoconf echo y | pacman -Sy python3 echo y | pacman -Sy lsof echo y | pacman -Sy python-pip +echo y | pacman -Sy curl +echo y | pacman -Sy libevent-devel +echo y | pacman -Sy libjpeg +echo y | pacman -Sy libpng +echo y | pacman -Sy libwebp +echo y | pacman -Sy gd +echo y | pacman -Sy cronie +echo y | pacman -Sy vi +echo y | pacman -Sy openssl +echo y | pacman -Sy pcre +echo y | pacman -Sy libmcrypt + +# zypper install -y freetype freetype-devel +# zypper install -y libjpeg-devel libpng-devel # echo y | pacman -Sy rpcgen # echo y | pacman -Sy mysql-dev +ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64 + #https need if [ ! -d /root/.acme.sh ];then curl https://get.acme.sh | sh From a5f074e84b0542073b33142ed44f218c7fcc25dd Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 01:43:58 +0800 Subject: [PATCH 150/263] Update arch.sh --- scripts/install/arch.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/install/arch.sh b/scripts/install/arch.sh index cbcb2ff00..ff81c1f54 100644 --- a/scripts/install/arch.sh +++ b/scripts/install/arch.sh @@ -8,11 +8,12 @@ LANG=en_US.UTF-8 echo y | pacman -Sy yaourt echo y | pacman -Sy gcc make cmake autoconf +echo y | pacman -Sy pkg-config echo y | pacman -Sy python3 echo y | pacman -Sy lsof echo y | pacman -Sy python-pip echo y | pacman -Sy curl -echo y | pacman -Sy libevent-devel +echo y | pacman -Sy libevent echo y | pacman -Sy libjpeg echo y | pacman -Sy libpng echo y | pacman -Sy libwebp @@ -22,6 +23,7 @@ echo y | pacman -Sy vi echo y | pacman -Sy openssl echo y | pacman -Sy pcre echo y | pacman -Sy libmcrypt +echo y | pacman -Sy oniguruma # zypper install -y freetype freetype-devel # zypper install -y libjpeg-devel libpng-devel From 4cc7390bcc99f414b615a42514e7786ada9a04ce Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 01:51:59 +0800 Subject: [PATCH 151/263] Update arch.sh --- scripts/install/arch.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/install/arch.sh b/scripts/install/arch.sh index ff81c1f54..7356645cf 100644 --- a/scripts/install/arch.sh +++ b/scripts/install/arch.sh @@ -17,6 +17,8 @@ echo y | pacman -Sy libevent echo y | pacman -Sy libjpeg echo y | pacman -Sy libpng echo y | pacman -Sy libwebp +echo y | pacman -Sy libxml2 +echo y | pacman -Sy libtirpc echo y | pacman -Sy gd echo y | pacman -Sy cronie echo y | pacman -Sy vi @@ -24,6 +26,10 @@ echo y | pacman -Sy openssl echo y | pacman -Sy pcre echo y | pacman -Sy libmcrypt echo y | pacman -Sy oniguruma +echo y | pacman -Sy libmemcached +echo y | pacman -Sy bison re2c +echo y | pacman -Sy graphviz +# echo y | pacman -Sy ImageMagick ImageMagick-devel # zypper install -y freetype freetype-devel # zypper install -y libjpeg-devel libpng-devel From 038ce11f87690fd47d5f0687c1b59335bbddcb64 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 10:13:30 +0800 Subject: [PATCH 152/263] Update arch.sh --- scripts/install/arch.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/install/arch.sh b/scripts/install/arch.sh index 7356645cf..d80924749 100644 --- a/scripts/install/arch.sh +++ b/scripts/install/arch.sh @@ -29,13 +29,18 @@ echo y | pacman -Sy oniguruma echo y | pacman -Sy libmemcached echo y | pacman -Sy bison re2c echo y | pacman -Sy graphviz -# echo y | pacman -Sy ImageMagick ImageMagick-devel +echo y | pacman -Sy mhash +echo y | pacman -Sy ncurses +echo y | pacman -Sy sqlite +echo y | pacman -Sy libtool +echo y | pacman -Sy imagemagick +echo y | pacman -Sy mariadb-clients # zypper install -y freetype freetype-devel # zypper install -y libjpeg-devel libpng-devel # echo y | pacman -Sy rpcgen -# echo y | pacman -Sy mysql-dev + ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64 From df8d44e7925fb898f6a455f5ac30e405d5b89aa4 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 10:13:44 +0800 Subject: [PATCH 153/263] Update arch.sh --- scripts/install/arch.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/install/arch.sh b/scripts/install/arch.sh index d80924749..969db666a 100644 --- a/scripts/install/arch.sh +++ b/scripts/install/arch.sh @@ -38,12 +38,8 @@ echo y | pacman -Sy mariadb-clients # zypper install -y freetype freetype-devel # zypper install -y libjpeg-devel libpng-devel - # echo y | pacman -Sy rpcgen - - - -ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64 +# ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64 #https need if [ ! -d /root/.acme.sh ];then From c02458f319a431fa229a6ea2f9eca1d646294dbb Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 10:56:18 +0800 Subject: [PATCH 154/263] up --- plugins/php/all_test.sh | 2 ++ scripts/install/arch.sh | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/plugins/php/all_test.sh b/plugins/php/all_test.sh index 8549810fd..bde6af8ee 100644 --- a/plugins/php/all_test.sh +++ b/plugins/php/all_test.sh @@ -7,6 +7,8 @@ DIR=$(cd "$(dirname "$0")"; pwd) # cd /www/server/mdserver-web/scripts/quick && bash debug.sh # cd /www/server/mdserver-web/plugins/php && bash all_test.sh + +# cd /www/server/mdserver-web/plugins/php && bash install.sh install 71 # cd /www/server/mdserver-web/plugins/php/versions/52/ && bash gd.sh install 52 # cd /www/server/mdserver-web/plugins/php/versions/52/ && bash openssl.sh install 52 diff --git a/scripts/install/arch.sh b/scripts/install/arch.sh index 969db666a..1b4d386da 100644 --- a/scripts/install/arch.sh +++ b/scripts/install/arch.sh @@ -16,6 +16,7 @@ echo y | pacman -Sy curl echo y | pacman -Sy libevent echo y | pacman -Sy libjpeg echo y | pacman -Sy libpng +echo y | pacman -Sy libzip echo y | pacman -Sy libwebp echo y | pacman -Sy libxml2 echo y | pacman -Sy libtirpc @@ -35,12 +36,15 @@ echo y | pacman -Sy sqlite echo y | pacman -Sy libtool echo y | pacman -Sy imagemagick echo y | pacman -Sy mariadb-clients +echo y | pacman -Sy rpcsvc-proto # zypper install -y freetype freetype-devel # zypper install -y libjpeg-devel libpng-devel # echo y | pacman -Sy rpcgen # ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64 +hwclock --systohc + #https need if [ ! -d /root/.acme.sh ];then curl https://get.acme.sh | sh From ce890d2be469cd1ae79431fb5b7c6ef612e431e2 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 11:09:02 +0800 Subject: [PATCH 155/263] =?UTF-8?q?=E7=A3=81=E7=9B=98=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/system_api.py | 5 ++++- scripts/install/arch.sh | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/class/core/system_api.py b/class/core/system_api.py index 80ad6ae9e..b174e31bd 100755 --- a/class/core/system_api.py +++ b/class/core/system_api.py @@ -319,7 +319,10 @@ class system_api: return 1 def getDiskInfo(self, get=None): - return self.getDiskInfo2() + info = self.getDiskInfo2() + if len(info) != 0: + return info + # 取磁盘分区信息 diskIo = psutil.disk_partitions() diskInfo = [] diff --git a/scripts/install/arch.sh b/scripts/install/arch.sh index 1b4d386da..2c0c80a65 100644 --- a/scripts/install/arch.sh +++ b/scripts/install/arch.sh @@ -37,6 +37,8 @@ echo y | pacman -Sy libtool echo y | pacman -Sy imagemagick echo y | pacman -Sy mariadb-clients echo y | pacman -Sy rpcsvc-proto +echo y | pacman -Sy lemon + # zypper install -y freetype freetype-devel # zypper install -y libjpeg-devel libpng-devel From 658893e5b497716536c01d99d7596f20b043cc25 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 11:22:39 +0800 Subject: [PATCH 156/263] Update system_api.py --- class/core/system_api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/class/core/system_api.py b/class/core/system_api.py index b174e31bd..56b737f0c 100755 --- a/class/core/system_api.py +++ b/class/core/system_api.py @@ -334,7 +334,9 @@ class system_api: continue tmp = {} tmp['path'] = disk[1] - tmp['size'] = psutil.disk_usage(disk[1]) + size_tmp = psutil.disk_usage(disk[1]) + tmp['size'] = [mw.toSize(size_tmp[0]), mw.toSize( + size_tmp[1]), mw.toSize(size_tmp[2]), str(size_tmp[2]) + '%'] diskInfo.append(tmp) return diskInfo From 782b944c212942ee8c6de78dae713e118600862f Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 11:23:14 +0800 Subject: [PATCH 157/263] Update system_api.py --- class/core/system_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/core/system_api.py b/class/core/system_api.py index 56b737f0c..dbe613a78 100755 --- a/class/core/system_api.py +++ b/class/core/system_api.py @@ -318,7 +318,7 @@ class system_api: except Exception as ex: return 1 - def getDiskInfo(self, get=None): + def getDiskInfo(self): info = self.getDiskInfo2() if len(info) != 0: return info From c5ccf12f537959bcbb8eb10f48a96efec5565d55 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 11:25:57 +0800 Subject: [PATCH 158/263] Update system_api.py --- class/core/system_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/core/system_api.py b/class/core/system_api.py index dbe613a78..f576275e8 100755 --- a/class/core/system_api.py +++ b/class/core/system_api.py @@ -336,7 +336,7 @@ class system_api: tmp['path'] = disk[1] size_tmp = psutil.disk_usage(disk[1]) tmp['size'] = [mw.toSize(size_tmp[0]), mw.toSize( - size_tmp[1]), mw.toSize(size_tmp[2]), str(size_tmp[2]) + '%'] + size_tmp[1]), mw.toSize(size_tmp[2]), str(size_tmp[3]) + '%'] diskInfo.append(tmp) return diskInfo From aa1bc2da664dcf95444d5df5ce8ed8452f84447c Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 11:39:52 +0800 Subject: [PATCH 159/263] Update index.js --- route/static/app/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/route/static/app/index.js b/route/static/app/index.js index 9ebe17ec1..b82771b17 100755 --- a/route/static/app/index.js +++ b/route/static/app/index.js @@ -137,6 +137,12 @@ function getDiskInfo() { } var LoadColor = setcolor(parseInt(rdata[i].size[3].replace('%', '')), false, 75, 90, 95); + + //判断linode信息是否存在 + var inodes = ''; + if (typeof (rdata[i]['inodes']!=='undefined'){ + inodes = '
' + rdata[i].size[3].replace('%', '') + '%
'; + } dBody = '
  • ' + '

    ' + rdata[i].path + '

    ' + '
    ' + @@ -145,9 +151,7 @@ function getDiskInfo() { '
    ' + '
    ' + '
    ' + - '
    ' + - '
    ' + rdata[i].size[3].replace('%', '') + '%
    ' + - '
  • ' + + ''+ inodes +'' + '

    ' + rdata[i].size[1] + '/' + rdata[i].size[0] + '

    ' + '' $("#systemInfoList").append(dBody); From 726ec1b406af5a4510a6ea3554889d4b727a81c9 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 11:41:40 +0800 Subject: [PATCH 160/263] Update index.js --- route/static/app/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route/static/app/index.js b/route/static/app/index.js index b82771b17..96e16dc15 100755 --- a/route/static/app/index.js +++ b/route/static/app/index.js @@ -140,7 +140,7 @@ function getDiskInfo() { //判断linode信息是否存在 var inodes = ''; - if (typeof (rdata[i]['inodes']!=='undefined'){ + if ( typeof(rdata[i]['inodes']) !=='undefined' ){ inodes = '
    ' + rdata[i].size[3].replace('%', '') + '%
    '; } dBody = '
  • ' + From e6461a64bdaf9da878589d4362f4c45419aba7f9 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 11:45:39 +0800 Subject: [PATCH 161/263] Update index.js --- route/static/app/index.js | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/route/static/app/index.js b/route/static/app/index.js index 96e16dc15..be5962744 100755 --- a/route/static/app/index.js +++ b/route/static/app/index.js @@ -124,11 +124,13 @@ function getDiskInfo() { $.get('/system/disk_info', function(rdata) { var dBody; for (var i = 0; i < rdata.length; i++) { - if (rdata[i].path == '/' || rdata[i].path == '/www') { - if (rdata[i].size[2].indexOf('M') != -1) { - $("#messageError").show(); - $("#messageError").append('

    ' + lan.get('diskinfo_span_1', [rdata[i].path]) + '[清理垃圾]

    '); - } + var LoadColor = setcolor(parseInt(rdata[i].size[3].replace('%', '')), false, 75, 90, 95); + + //判断linode信息是否存在 + var inodes = ''; + if ( typeof(rdata[i]['inodes']) !=='undefined' ){ + inodes = '
    ' + rdata[i].size[3].replace('%', '') + '%
    '; + var ipre = parseInt(rdata[i].inodes[3].replace('%', '')); if (ipre > 95) { $("#messageError").show(); @@ -136,13 +138,15 @@ function getDiskInfo() { } } - var LoadColor = setcolor(parseInt(rdata[i].size[3].replace('%', '')), false, 75, 90, 95); - - //判断linode信息是否存在 - var inodes = ''; - if ( typeof(rdata[i]['inodes']) !=='undefined' ){ - inodes = '
    ' + rdata[i].size[3].replace('%', '') + '%
    '; + if (rdata[i].path == '/' || rdata[i].path == '/www') { + if (rdata[i].size[2].indexOf('M') != -1) { + $("#messageError").show(); + $("#messageError").append('

    ' + lan.get('diskinfo_span_1', [rdata[i].path]) + '[清理垃圾]

    '); + } + } + + dBody = '
  • ' + '

    ' + rdata[i].path + '

    ' + '
    ' + From 2f78dcd157de3b5723d11b7d8e92ad4ddc5bc16f Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 11:46:18 +0800 Subject: [PATCH 162/263] Update index.js --- route/static/app/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/route/static/app/index.js b/route/static/app/index.js index be5962744..b2ab62933 100755 --- a/route/static/app/index.js +++ b/route/static/app/index.js @@ -142,10 +142,8 @@ function getDiskInfo() { if (rdata[i].size[2].indexOf('M') != -1) { $("#messageError").show(); $("#messageError").append('

    ' + lan.get('diskinfo_span_1', [rdata[i].path]) + '[清理垃圾]

    '); - } - + } } - dBody = '
  • ' + '

    ' + rdata[i].path + '

    ' + From 5477aa23b36c4ec9f366a2b3001acbe487007423 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 11:49:07 +0800 Subject: [PATCH 163/263] Update index.js --- route/static/app/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route/static/app/index.js b/route/static/app/index.js index b2ab62933..34fabea40 100755 --- a/route/static/app/index.js +++ b/route/static/app/index.js @@ -126,7 +126,7 @@ function getDiskInfo() { for (var i = 0; i < rdata.length; i++) { var LoadColor = setcolor(parseInt(rdata[i].size[3].replace('%', '')), false, 75, 90, 95); - //判断linode信息是否存在 + //判断inode信息是否存在 var inodes = ''; if ( typeof(rdata[i]['inodes']) !=='undefined' ){ inodes = '
    ' + rdata[i].size[3].replace('%', '') + '%
    '; From 1ccd28f7d8722a0b9c7c9f09a7dccd046f69c567 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 11:56:15 +0800 Subject: [PATCH 164/263] Update system_api.py --- class/core/system_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class/core/system_api.py b/class/core/system_api.py index f576275e8..f70499fe6 100755 --- a/class/core/system_api.py +++ b/class/core/system_api.py @@ -350,8 +350,8 @@ class system_api: tempInodes1 = tempInodes.split('\n') diskInfo = [] n = 0 - cuts = ['/mnt/cdrom', '/boot', '/boot/efi', '/dev', - '/dev/shm', '/run/lock', '/run', '/run/shm', '/run/user'] + cuts = ['/mnt/cdrom', '/boot', '/boot/efi', '/dev/shm', + '/run/lock', '/run', '/run/shm', '/run/user'] for tmp in temp1: n += 1 inodes = tempInodes1[n - 1].split() From 6251eb6690dc259bcb46710d7a3b6f4161ed6f2a Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 12:00:05 +0800 Subject: [PATCH 165/263] Update system_api.py --- class/core/system_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class/core/system_api.py b/class/core/system_api.py index f70499fe6..f576275e8 100755 --- a/class/core/system_api.py +++ b/class/core/system_api.py @@ -350,8 +350,8 @@ class system_api: tempInodes1 = tempInodes.split('\n') diskInfo = [] n = 0 - cuts = ['/mnt/cdrom', '/boot', '/boot/efi', '/dev/shm', - '/run/lock', '/run', '/run/shm', '/run/user'] + cuts = ['/mnt/cdrom', '/boot', '/boot/efi', '/dev', + '/dev/shm', '/run/lock', '/run', '/run/shm', '/run/user'] for tmp in temp1: n += 1 inodes = tempInodes1[n - 1].split() From 6024628d74f0862464639203f49a15980371625f Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 12:12:27 +0800 Subject: [PATCH 166/263] Update system_api.py --- class/core/system_api.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/class/core/system_api.py b/class/core/system_api.py index f576275e8..a45877909 100755 --- a/class/core/system_api.py +++ b/class/core/system_api.py @@ -371,16 +371,7 @@ class system_api: tmp1 = [disk[1], disk[2], disk[3], disk[4]] arr['size'] = tmp1 arr['inodes'] = [inodes[1], inodes[2], inodes[3], inodes[4]] - if disk[5] == '/': - bootLog = os.getcwd() + '/tmp/panelBoot.pl' - if disk[2].find('M') != -1: - if os.path.exists(bootLog): - os.system('rm -f ' + bootLog) - else: - if not os.path.exists(bootLog): - pass - if inodes[2] != '0': - diskInfo.append(arr) + diskInfo.append(arr) return diskInfo # 清理系统垃圾 From cde108630344caf53995ed1ffd3e3217b7a9ca88 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 12:15:59 +0800 Subject: [PATCH 167/263] Update arch.sh --- scripts/install/arch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/arch.sh b/scripts/install/arch.sh index 2c0c80a65..d7d4411d0 100644 --- a/scripts/install/arch.sh +++ b/scripts/install/arch.sh @@ -38,7 +38,7 @@ echo y | pacman -Sy imagemagick echo y | pacman -Sy mariadb-clients echo y | pacman -Sy rpcsvc-proto echo y | pacman -Sy lemon - +echo y | pacman -Sy which # zypper install -y freetype freetype-devel # zypper install -y libjpeg-devel libpng-devel From 74e39ca84b27ad9108858fdb1e58db382a0dcbb1 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 12:46:17 +0800 Subject: [PATCH 168/263] up --- README.md | 9 +++++++++ scripts/install/arch.sh | 2 ++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index f3d928237..399d2ec14 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,15 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/up ### 微信赞助 [![截图](/route/static/img/weixin_zz.jpg)](/route/static/img/weixin_zz.jpg) + + +### 兼容性测试报告 + +| 软件 | CentOS [7.9, 8.4] | CentOS Stream [8, 9]| +| 面板[MW] | ✅ |:x:| ✅ | + + + ### 无图不真相 [![截图](/route/static/mdw.jpg)](/route/static/mdw.jpg) diff --git a/scripts/install/arch.sh b/scripts/install/arch.sh index d7d4411d0..982135683 100644 --- a/scripts/install/arch.sh +++ b/scripts/install/arch.sh @@ -40,6 +40,8 @@ echo y | pacman -Sy rpcsvc-proto echo y | pacman -Sy lemon echo y | pacman -Sy which +# echo y | pacman -Sy chkconfig + # zypper install -y freetype freetype-devel # zypper install -y libjpeg-devel libpng-devel # echo y | pacman -Sy rpcgen From 0f6d87a8a4fdc559ac250edcdd61608bd4af3171 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 12:51:06 +0800 Subject: [PATCH 169/263] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 399d2ec14..2a2ad2943 100644 --- a/README.md +++ b/README.md @@ -110,8 +110,9 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/up ### 兼容性测试报告 -| 软件 | CentOS [7.9, 8.4] | CentOS Stream [8, 9]| -| 面板[MW] | ✅ |:x:| ✅ | +| 软件 | CentOS [7.9, 8.4] | CentOS Stream [8, 9]| +| -------- | ------------------ | -------- | +| 面板[MW] | ✅ | :x: | ✅ | From 9027149dca497c2084e82913a232da965af3639e Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 14:17:23 +0800 Subject: [PATCH 170/263] =?UTF-8?q?=E9=87=8D=E5=86=99=E5=90=91=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- route/static/app/site.js | 90 ++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 50 deletions(-) diff --git a/route/static/app/site.js b/route/static/app/site.js index 325bf6f9e..f20137106 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -1495,16 +1495,10 @@ function to301(siteName, type, obj){ }, function(res) { res = JSON.parse(res); if (res.status == true) { - layer.msg('删除成功', { - time: 1000, - icon: 1 - }); - to301(siteName) + layer.msg('删除成功', {time: 1000,icon: 1}); + to301(siteName); } else { - layer.msg(res.msg, { - time: 1000, - icon: 2 - }); + layer.msg(res.msg, {time: 1000,icon: 2}); } }); return @@ -1512,64 +1506,62 @@ function to301(siteName, type, obj){ if (type == 3) { var laoding = layer.load(); - $.post('/site/get_redirect_conf', { - siteName: siteName, - id: obj, - }, function(res) { + var data = {siteName: siteName,id: obj}; + $.post('/site/get_redirect_conf', data, function(res) { layer.close(laoding); res = JSON.parse(res); if (res.status == true) { var mBody = "
    \ - \ + \
    \ - \
      \
    • 此处为重定向配置文件,若您不了解配置规则,请勿随意修改.
    • \
    \
    \
    "; + var editor; var index = layer.open({ type: 1, title: '编辑配置文件', closeBtn: 1, - shadeClose: false, + shadeClose: true, area: ['500px', '500px'], + btn: ['提交','关闭'], content: mBody, success: function () { - $("#SaveRedirectConfigFileBtn").click(function(){ - $("#configBody").empty(); - $("#configBody").text(editor.getValue()); - var load = layer.load() - $.post('/site/save_redirect_conf', { - siteName: siteName, - id: obj, - config: editor.getValue() - }, function(res) { - layer.close(load) - var res = JSON.parse(res); - if (res.status == true) { - layer.msg('保存成功', { - icon: 1 - }); - layer.close(index); - } else { - layer.msg(res.msg, { - time: 1000, - icon: 2 - }); - } - }); - }) - } + editor = CodeMirror.fromTextArea(document.getElementById("configRedirectBody"), { + extraKeys: {"Ctrl-Space": "autocomplete"}, + lineNumbers: true, + matchBrackets:true, + }); + editor.focus(); + $(".CodeMirror-scroll").css({"height":"300px","margin":0,"padding":0}); + $("#onlineEditFileBtn").unbind('click'); + }, + yes:function(index,layero){ + $("#configRedirectBody").empty().text(editor.getValue()); + var load = layer.load(); + var data = { + siteName: siteName, + id: obj, + config: editor.getValue(), + }; + $.post('/site/save_redirect_conf', data, function(res) { + layer.close(load) + var res = JSON.parse(res); + if (res.status == true) { + layer.msg('保存成功', {icon: 1}); + layer.close(index); + } else { + layer.msg(res.msg, {time: 3000,icon: 2}); + } + }); + return true; + }, }); - var editor = CodeMirror.fromTextArea(document.getElementById("configBody"), { - extraKeys: {"Ctrl-Space": "autocomplete"}, - lineNumbers: true, - matchBrackets:true, - }); - $(".CodeMirror-scroll").css({"height":"300px","margin":0,"padding":0}); - } else { + } else { + layer.msg('请求错误!!', {time: 3000,icon: 2}); } }); return @@ -1597,7 +1589,6 @@ function to301(siteName, type, obj){ $("#webedit-con").html(body); var loadT = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']}); - $.post('/site/get_redirect','siteName='+siteName, function(response) { layer.close(loadT); $("#md-301-loading").remove(); @@ -1625,7 +1616,6 @@ function to301(siteName, type, obj){ //反向代理 function toProxy(siteName, type, obj) { - // 设置 页面展示 if(type == 1) { var proxy_form = layer.open({ From 7d7d18e27b3916a9b0c0f18ff78d63033bb4de2f Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 14:39:09 +0800 Subject: [PATCH 171/263] =?UTF-8?q?=E5=8F=8D=E5=90=91=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/site_api.py | 40 +++++++++++++++++++++-- route/static/app/site.js | 68 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 104 insertions(+), 4 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index dcf46424e..2c9e01968 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -1430,6 +1430,42 @@ class site_api: mw.writeFile(vhost_file, content) + def getProxyConfApi(self): + _siteName = request.form.get("siteName", '') + _id = request.form.get("id", '') + if _id == '' or _siteName == '': + return mw.returnJson(False, "必填项不能为空!") + + data = mw.readFile( + "{}/{}/{}.conf".format(self.proxyPath, _siteName, _id)) + if data == False: + return mw.returnJson(False, "获取失败!") + return mw.returnJson(True, "ok", {"result": data}) + + def saveProxyConfApi(self): + _siteName = request.form.get("siteName", '') + _id = request.form.get("id", '') + _config = request.form.get("config", "") + if _id == '' or _siteName == '': + return mw.returnJson(False, "必填项不能为空!") + + _old_config = mw.readFile( + "{}/{}/{}.conf".format(self.proxyPath, _siteName, _id)) + if _old_config == False: + return mw.returnJson(False, "非法操作") + + mw.writeFile("{}/{}/{}.conf".format(self.proxyPath, + _siteName, _id), _config) + rule_test = mw.checkWebConfig() + if rule_test != True: + mw.writeFile("{}/{}/{}.conf".format(self.proxyPath, + _siteName, _id), _old_config) + return mw.returnJson(False, "OpenResty 配置测试不通过, 请重试: {}".format(rule_test)) + + self.operateRedirectConf(_siteName, 'start') + mw.restartWeb() + return mw.returnJson(True, "ok") + # 读取 网站 反向代理列表 def getProxyListApi(self): _siteName = request.form.get('siteName', '') @@ -1527,9 +1563,7 @@ location ~* ^{from}(.*)$ { self.operateProxyConf(_siteName, 'start') mw.restartWeb() - return mw.returnJson(True, "ok", { - "hash": _id - }) + return mw.returnJson(True, "ok", {"hash": _id}) def delProxyApi(self): _siteName = request.form.get("siteName", '') diff --git a/route/static/app/site.js b/route/static/app/site.js index f20137106..c5072888c 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -1696,6 +1696,69 @@ function toProxy(siteName, type, obj) { } + if (type == 3) { + var laoding = layer.load(); + var data = {siteName: siteName,id: obj}; + $.post('/site/get_proxy_conf', data, function(res) { + layer.close(laoding); + res = JSON.parse(res); + if (res.status == true) { + var mBody = "
    \ + \ +
    \ +
      \ +
    • 此处为反向代理配置文件,若您不了解配置规则,请勿随意修改.
    • \ +
    \ +
    \ +
    "; + var editor; + var index = layer.open({ + type: 1, + title: '编辑配置文件', + closeBtn: 1, + shadeClose: true, + area: ['500px', '500px'], + btn: ['提交','关闭'], + content: mBody, + success: function () { + editor = CodeMirror.fromTextArea(document.getElementById("configRedirectBody"), { + extraKeys: {"Ctrl-Space": "autocomplete"}, + lineNumbers: true, + matchBrackets:true, + }); + editor.focus(); + $(".CodeMirror-scroll").css({"height":"300px","margin":0,"padding":0}); + $("#onlineEditFileBtn").unbind('click'); + }, + yes:function(index,layero){ + $("#configRedirectBody").empty().text(editor.getValue()); + var load = layer.load(); + var data = { + siteName: siteName, + id: obj, + config: editor.getValue(), + }; + $.post('/site/save_proxy_conf', data, function(res) { + layer.close(load) + var res = JSON.parse(res); + if (res.status == true) { + layer.msg('保存成功', {icon: 1}); + layer.close(index); + } else { + layer.msg(res.msg, {time: 3000,icon: 2}); + } + }); + return true; + }, + }); + } else { + layer.msg('请求错误!!', {time: 3000,icon: 2}); + } + }); + return + } + + var body = '
    \
    \ \ @@ -1729,7 +1792,10 @@ function toProxy(siteName, type, obj) { let tmp = '\ '+item.from+'\ '+item.to+'\ - 删除\ + \ + 详情 |\ + 删除\ + \ '; $("#md-301-body").append(tmp); }) From 7e84f77355696a145ad3b1b6dec166c8029825ce Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 17:04:04 +0800 Subject: [PATCH 172/263] up --- README.md | 11 +---------- compatibility.md | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 compatibility.md diff --git a/README.md b/README.md index 2a2ad2943..7800115ed 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ 基本上可以使用,后续会继续优化!欢迎提供意见! - 吹水组 - https://t.me/mdserver_web - +- [兼容性测试报告](/compatibility.md) ### 主要插件介绍 * OpenResty - 轻量级,占有内存少,并发能力强。 @@ -107,15 +107,6 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/up [![截图](/route/static/img/weixin_zz.jpg)](/route/static/img/weixin_zz.jpg) - -### 兼容性测试报告 - -| 软件 | CentOS [7.9, 8.4] | CentOS Stream [8, 9]| -| -------- | ------------------ | -------- | -| 面板[MW] | ✅ | :x: | ✅ | - - - ### 无图不真相 [![截图](/route/static/mdw.jpg)](/route/static/mdw.jpg) diff --git a/compatibility.md b/compatibility.md new file mode 100644 index 000000000..410139a19 --- /dev/null +++ b/compatibility.md @@ -0,0 +1,15 @@ +### 兼容性测试报告 + +- 面板支持 + +| 系统名称 | 是否兼容 | +| ------- | ------- | +| CentOS X |:white_check_mark:| +| Debian X |✅| +| Ubuntu X|✅| +| Fedora X |✅| +| AlmaLinix 9 |✅| +| RockyLinux 8.6 |✅| +| openSUSE 15.4 |✅| + + From 0e115fdca4d3f540fe1c80b47a6b681fecc655c8 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 17:10:03 +0800 Subject: [PATCH 173/263] Update compatibility.md --- compatibility.md | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/compatibility.md b/compatibility.md index 410139a19..e1a9b965c 100644 --- a/compatibility.md +++ b/compatibility.md @@ -1,15 +1,22 @@ ### 兼容性测试报告 -- 面板支持 - -| 系统名称 | 是否兼容 | -| ------- | ------- | -| CentOS X |:white_check_mark:| -| Debian X |✅| -| Ubuntu X|✅| -| Fedora X |✅| -| AlmaLinix 9 |✅| -| RockyLinux 8.6 |✅| -| openSUSE 15.4 |✅| + + +| 系统名称 | 面板 | OpenResty | +| ------- | ------- |---------------|-------------| +| CentOS 7.9 |:white_check_mark:| +| CentOS 8.4 |:x: |✅ | +| CentOS 8 Stream |✅ |✅ | +| CentOS 9 Stream |✅ |✅ | +| Debian 10.3 |✅ |✅ | +| Debian 11.3 |✅ |✅ | +| Ubuntu 10.04 |✅ |✅ | +| Ubuntu 11.3 |✅ |✅ | +| Ubuntu 11.3 |✅ |✅ | +| Fedora 31 |✅ |✅ | +| Fedora 32 |✅ |✅ | +| AlmaLinix 9 |✅ |✅ | +| RockyLinux 8.6 |✅ |✅ | +| openSUSE 15.4 |✅ |✅ | From d9b4367c95155eed75282d5fe7081ac3382d4e8a Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 17:10:41 +0800 Subject: [PATCH 174/263] Update compatibility.md --- compatibility.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compatibility.md b/compatibility.md index e1a9b965c..33d460c3a 100644 --- a/compatibility.md +++ b/compatibility.md @@ -2,9 +2,9 @@ -| 系统名称 | 面板 | OpenResty | -| ------- | ------- |---------------|-------------| -| CentOS 7.9 |:white_check_mark:| +| 系统名称 | 面板 | OpenResty | +| ------- | ------- |---------------|---------------| +| CentOS 7.9 |:white_check_mark:|✅ | | CentOS 8.4 |:x: |✅ | | CentOS 8 Stream |✅ |✅ | | CentOS 9 Stream |✅ |✅ | From ba2ff2f592b8bd1338504361e52227e10a13830f Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 17:10:53 +0800 Subject: [PATCH 175/263] Update compatibility.md --- compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compatibility.md b/compatibility.md index 33d460c3a..5b52e7277 100644 --- a/compatibility.md +++ b/compatibility.md @@ -3,7 +3,7 @@ | 系统名称 | 面板 | OpenResty | -| ------- | ------- |---------------|---------------| +| ----------------- |---------------|---------------| | CentOS 7.9 |:white_check_mark:|✅ | | CentOS 8.4 |:x: |✅ | | CentOS 8 Stream |✅ |✅ | From 24f0063f9e325ce3d28afba0940d6a83a600bfe4 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 17:11:19 +0800 Subject: [PATCH 176/263] Update compatibility.md --- compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compatibility.md b/compatibility.md index 5b52e7277..ccbbd9579 100644 --- a/compatibility.md +++ b/compatibility.md @@ -4,7 +4,7 @@ | 系统名称 | 面板 | OpenResty | | ----------------- |---------------|---------------| -| CentOS 7.9 |:white_check_mark:|✅ | +| CentOS 7.9 |✅ |✅ | | CentOS 8.4 |:x: |✅ | | CentOS 8 Stream |✅ |✅ | | CentOS 9 Stream |✅ |✅ | From bc334160d9a8ae40e9331f6afff46e7ead89090f Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 17:11:47 +0800 Subject: [PATCH 177/263] Update compatibility.md --- compatibility.md | 1 - 1 file changed, 1 deletion(-) diff --git a/compatibility.md b/compatibility.md index ccbbd9579..57f6b52d0 100644 --- a/compatibility.md +++ b/compatibility.md @@ -11,7 +11,6 @@ | Debian 10.3 |✅ |✅ | | Debian 11.3 |✅ |✅ | | Ubuntu 10.04 |✅ |✅ | -| Ubuntu 11.3 |✅ |✅ | | Ubuntu 11.3 |✅ |✅ | | Fedora 31 |✅ |✅ | | Fedora 32 |✅ |✅ | From 4d3a1da2a83de270685a640278c92635f58ca2a1 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 17:23:40 +0800 Subject: [PATCH 178/263] Update compatibility.md --- compatibility.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/compatibility.md b/compatibility.md index 57f6b52d0..12efae2ad 100644 --- a/compatibility.md +++ b/compatibility.md @@ -1,5 +1,6 @@ ### 兼容性测试报告 +- 暂时不具有意见 | 系统名称 | 面板 | OpenResty | @@ -19,3 +20,38 @@ | openSUSE 15.4 |✅ |✅ | + +| 系统名称 | PHP52 |PHP53 |PHP54 |PHP55 |PHP56 |PHP70 |PHP71 |PHP72 |PHP73 |PHP74 |PHP80 |PHP81 | +| ----------------- |-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------| +| CentOS 7.9 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| CentOS 8.4 |:x: |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| CentOS 8 Stream |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| CentOS 9 Stream |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| Debian 10.3 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| Debian 11.3 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| Ubuntu 10.04 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| Ubuntu 11.3 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| Fedora 31 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| Fedora 32 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| AlmaLinix 9 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| RockyLinux 8.6 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| openSUSE 15.4 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | + + + +| 系统名称 | MySQL55 |MySQL56 |MySQL57 |MySQL80 | +| ----------------- |-----------|-----------|-----------|-----------| +| CentOS 7.9 |✅ |✅ |✅ |✅ | +| CentOS 8.4 |:x: |✅ |✅ |✅ | +| CentOS 8 Stream |✅ |✅ |✅ |✅ | +| CentOS 9 Stream |✅ |✅ |✅ |✅ | +| Debian 10.3 |✅ |✅ |✅ |✅ | +| Debian 11.3 |✅ |✅ |✅ |✅ | +| Ubuntu 10.04 |✅ |✅ |✅ |✅ | +| Ubuntu 11.3 |✅ |✅ |✅ |✅ | +| Fedora 31 |✅ |✅ |✅ |✅ | +| Fedora 32 |✅ |✅ |✅ |✅ | +| AlmaLinix 9 |✅ |✅ |✅ |✅ | +| RockyLinux 8.6 |✅ |✅ |✅ |✅ | +| openSUSE 15.4 |✅ |✅ |✅ |✅ | + From 121b5681befe5e49b566b7724d5aa3a2ad318447 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 17:40:37 +0800 Subject: [PATCH 179/263] Update compatibility.md --- compatibility.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compatibility.md b/compatibility.md index 12efae2ad..2499907f1 100644 --- a/compatibility.md +++ b/compatibility.md @@ -17,7 +17,7 @@ | Fedora 32 |✅ |✅ | | AlmaLinix 9 |✅ |✅ | | RockyLinux 8.6 |✅ |✅ | -| openSUSE 15.4 |✅ |✅ | +| openSUSE 15.4 |:x: |:x: | @@ -35,7 +35,7 @@ | Fedora 32 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | | AlmaLinix 9 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | | RockyLinux 8.6 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | -| openSUSE 15.4 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| openSUSE 15.4 |:x: |:x: |:x: |:x: |:x: |:x: |:x: |:x: |:x: |:x: |:x: |:x: | @@ -53,5 +53,5 @@ | Fedora 32 |✅ |✅ |✅ |✅ | | AlmaLinix 9 |✅ |✅ |✅ |✅ | | RockyLinux 8.6 |✅ |✅ |✅ |✅ | -| openSUSE 15.4 |✅ |✅ |✅ |✅ | +| openSUSE 15.4 |:x: |:x: |:x: |:x: | From 338f3fe55e8161d52748b242d8823dd09e634cbf Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 17:41:34 +0800 Subject: [PATCH 180/263] Update compatibility.md --- compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compatibility.md b/compatibility.md index 2499907f1..1db01f8a1 100644 --- a/compatibility.md +++ b/compatibility.md @@ -1,6 +1,6 @@ ### 兼容性测试报告 -- 暂时不具有意见 +- 暂时不具有指导意见 | 系统名称 | 面板 | OpenResty | From b00042ecff0e8e5b18eeeece27783286a82023e9 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 17:51:10 +0800 Subject: [PATCH 181/263] Update compatibility.md --- compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compatibility.md b/compatibility.md index 1db01f8a1..7bc30aa5a 100644 --- a/compatibility.md +++ b/compatibility.md @@ -28,7 +28,7 @@ | CentOS 8 Stream |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | | CentOS 9 Stream |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | | Debian 10.3 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | -| Debian 11.3 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| Debian 11.3 |:x: |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | | Ubuntu 10.04 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | | Ubuntu 11.3 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | | Fedora 31 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | From 935b504377ced3440e014e03a583a97f1ddcfbd5 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 17:58:49 +0800 Subject: [PATCH 182/263] =?UTF-8?q?=E7=A7=BB=E9=99=A4csvn=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E4=B8=BA=E6=A0=B8=E5=BF=83=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/csvn/hook/commit.tpl | 34 -- plugins/csvn/hook/post-commit.tpl | 11 - plugins/csvn/ico.png | Bin 2194 -> 0 bytes plugins/csvn/index.html | 41 -- plugins/csvn/index.py | 711 ------------------------------ plugins/csvn/info.json | 17 - plugins/csvn/install.sh | 107 ----- plugins/csvn/js/csvn.js | 500 --------------------- 8 files changed, 1421 deletions(-) delete mode 100755 plugins/csvn/hook/commit.tpl delete mode 100755 plugins/csvn/hook/post-commit.tpl delete mode 100644 plugins/csvn/ico.png delete mode 100755 plugins/csvn/index.html delete mode 100755 plugins/csvn/index.py delete mode 100755 plugins/csvn/info.json delete mode 100755 plugins/csvn/install.sh delete mode 100755 plugins/csvn/js/csvn.js diff --git a/plugins/csvn/hook/commit.tpl b/plugins/csvn/hook/commit.tpl deleted file mode 100755 index 886abed28..000000000 --- a/plugins/csvn/hook/commit.tpl +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -export LC_ALL=en_US.UTF-8 -export LC_CTYPE=zh_CN.UTF-8 - - -REPOS="$1" -REV="$2" -TXN_NAME="$3" - - -if [ ! -d {$PROJECT_DIR}/csvn ]; then - sudo mkdir -p {$PROJECT_DIR}/csvn - sudo chown -R csvn:csvn {$PROJECT_DIR}/csvn -fi - -SAVE_PATH={$PROJECT_DIR}/csvn/$REPOS -SVN_PATH=http://127.0.0.1:{$PORT}/svn/$REPOS - -if [ ! -d $SAVE_PATH ]; then - svn co $SVN_PATH $SAVE_PATH \ - --username={$CSVN_USER} \ - --password={$CSVN_PWD} \ - --no-auth-cache \ - --non-interactive -fi - -cd $SAVE_PATH && svn update --username={$CSVN_USER} --password={$CSVN_PWD} --no-auth-cache --non-interactive - -WEB_PATH={$PROJECT_DIR}/wwwroot/$REPOS -sudo mkdir -p $WEB_PATH - -sudo rsync -vauP --delete --exclude=".*" $SAVE_PATH/ $WEB_PATH -sudo chown -R www:www $WEB_PATH \ No newline at end of file diff --git a/plugins/csvn/hook/post-commit.tpl b/plugins/csvn/hook/post-commit.tpl deleted file mode 100755 index 2e52d3f19..000000000 --- a/plugins/csvn/hook/post-commit.tpl +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - - - -REPOS="$1" -REV="$2" -TXN_NAME="$3" - -REPOS_NAME=${REPOS##*/} - -sh -x $REPOS/hooks/commit $REPOS_NAME $REV $TXN_NAME 2>$REPOS/sh.log diff --git a/plugins/csvn/ico.png b/plugins/csvn/ico.png deleted file mode 100644 index b84c97defb36b3b393a06e347a6f70229cf722b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2194 zcmV;D2yOR?P)@9Xot=bYy}uc;+lvL#!xCHud&Mv7kEruJ-z=zO-YA@~Sy3Ummj;ETLD zxDWrwcw_JhK_74lMF9FS6T>>6XJ-%y@=X_{JKvHL zj#n-u9Ze%ini*{`%)6a_>s(v5F0A)|6D4>GfNmmFqnwG2cB;Khm&VTu2KH-VqyKS~ z@S|OtYBp5pEEULs{U@dfR#iIc*n!~RkQ1)UO2R#)G~Ac~Y!wzc43@C?8V6Hw@_3}+0yCYS=h5KQdvz>dcw z=3ol1`_XR)@mcE+iaeFgRLK{!D>3xOK(wStjyYNZrXN7Ali&gBs+@3tro^4+@qQW^ z8U>(n^8O4!_mq-gF3Sn$AxWfPNQ;girGIF19|=(RE?Rh@j1or{r-3t9(z+oS~ZJ^_P3uOqlK$VNyKD;^jS zO7iPxS?I5g)bf;IDIldKiH-*W_IdQzhhz;|3!g;Ky_ps(JyZ3$VXg+svI1klA2G3q zG1D$1TYrflgA_<+-bD!L$M9>jr>&rmIHjjlPuOmOGQDr4ySz9Z2Pl*v0Yn_@KLMzY zv5t*vsT^5*VRc>@Wr<#scu+o}`vsX5L7bWC2lwZ4-1%$JbJbK9G%5+mRLuFh9CwYQ zTqnsMgf!Bk^Mj$D3MbhkS89Z01%TcGiCpI`?73!5P0{>-Q2(>RjG>gCO9_xAS=f;V zYDFemQ93AAc+=6U9azhQ?thB?-c7|EO?~y&`=}flbYLaQ?XXZ>H-XZ-7B&X#3zgjG zq}-&0OGZ;S#aFLP?CLP z5K`w)2x4+Kg25?YAp?~+2lj{7yYJ6t52DO@3|F#lcX8bmQSM!8&zAWW0w`KR*}*?W z5A>!IR!yz|5e-LX34)MGFvJ1wMg*#$eZ6aQ{UXAYWU)){XK^TRAUhK?fNGDmIW7jocG(*t5c%=VI|@G4T#|*l->zwGcNUA*v znIK|y-f9Bowl8<2l;j?p9fR_*%*?$=z&$8D6r;a8h*C_8G)L4oVaDMEGbBZ;o;tbH zlFe@f%jRyUEtFgJ>>8i1L(O(^`r1PX`YikcKwSdBOUTScWNbh%2M(fVo+gagNJQ*^ zV+SBGNhv~%t{W6LuALHQPA4T;HJP}x2cmmZEe7`;KAHsK!>* ztg5kcI&WQA=YJw%3hpGmgPv;SwBBu@LT_nPQ4WUmVp&YZDlKx1i2~4h_*IlQ z2SwUTE_?H>lR8c7GNP>_6Svil^wMPzxzlV)=(~~9u4-IIukC=hsmoU{Lg~2&b*ZO9 z4{_Q8LHmJ{WF|oU7v(tUKZfk#4y6cH<-;Ov>W7F$?|E?DXuw|%gwi65Wxh|IN15Jj zHVF0`jM?fC=qs|wWT4n5&|4p8lFV6L0FMLc9|7_xbmDOk%|Z0vlf&`yO$vUypzc;9 zYG4#)mX1}}B+ -.outline_no { - outline:none; -} - -
    -
    -
    -

    服务

    -

    自启动

    -

    手动编辑

    -

    用户管理

    -

    项目管理

    -

    使用说明

    -
    -
    -
    -
    -
    - -
    - diff --git a/plugins/csvn/index.py b/plugins/csvn/index.py deleted file mode 100755 index 3689b70b8..000000000 --- a/plugins/csvn/index.py +++ /dev/null @@ -1,711 +0,0 @@ -# coding: utf-8 - -import time -import random -import os -import urllib -import binascii -import json -import re -import sys -import subprocess - -sys.path.append(os.getcwd() + "/class/core") -import mw - - -app_debug = False -if mw.isAppleSystem(): - app_debug = True - - -def getPluginName(): - return 'csvn' - - -def getPluginDir(): - return mw.getPluginDir() + '/' + getPluginName() - - -def getServerDir(): - return mw.getServerDir() + '/' + getPluginName() - - -def getInitDFile(): - if app_debug: - return '/tmp/' + getPluginName() - return '/etc/init.d/' + getPluginName() - - -def getArgs(): - args = sys.argv[2:] - tmp = {} - args_len = len(args) - - if args_len == 1: - t = args[0].strip('{').strip('}') - t = t.split(':') - tmp[t[0]] = t[1] - elif args_len > 1: - for i in range(len(args)): - t = args[i].split(':') - tmp[t[0]] = t[1] - - return tmp - - -def initDreplace(): - initd_file = getInitDFile() - - if not os.path.exists(initd_file): - return getServerDir() - - return initd_file - - -def status(): - data = mw.execShell( - "ps -ef|grep " + getPluginName() + " |grep -v grep | grep -v python | awk '{print $2}'") - if data[0] == '': - return 'stop' - return 'start' - - -def csvnOp(method): - - if app_debug: - os_name = mw.getOs() - if os_name == 'darwin': - return "Apple Computer does not support" - - _initd_csvn = '/etc/init.d/csvn' - _initd_csvn_httpd = '/etc/init.d/csvn-httpd' - #_csvn = getServerDir() + '/bin/csvn' - #_csvn_httpd = getServerDir() + '/bin/csvn-httpd' - - ret_csvn_httpd = mw.execShell(_initd_csvn_httpd + ' ' + method) - # ret_csvn = mw.execShell(_initd_csvn + ' ' + method) - subprocess.Popen(_initd_csvn + ' ' + method, - stdout=subprocess.PIPE, shell=True) - if ret_csvn_httpd[1] == '': - return 'ok' - return 'fail' - - -def start(): - if not os.path.exists("/etc/init.d/csvn"): - return "先在自启动安装!" - return csvnOp('start') - - -def stop(): - return csvnOp('stop') - - -def restart(): - return csvnOp('restart') - - -def reload(): - return csvnOp('reload') - - -def initdStatus(): - if not app_debug: - if mw.isAppleSystem(): - return "Apple Computer does not support" - - _initd_csvn = '/etc/init.d/csvn' - _initd_csvn_httpd = '/etc/init.d/csvn-httpd' - - if os.path.exists(_initd_csvn) and os.path.exists(_initd_csvn_httpd): - return 'ok' - return 'fail' - - -def initdInstall(): - import shutil - if not app_debug: - if mw.isAppleSystem(): - return "Apple Computer does not support" - - _csvn = getServerDir() + '/bin/csvn' - _csvn_httpd = getServerDir() + '/bin/csvn-httpd' - - ret_csvn = mw.execShell(_csvn + ' install') - ret_csvn_httpd = mw.execShell(_csvn_httpd + ' install') - if ret_csvn[1] == '' and ret_csvn_httpd[1] == '': - return 'ok' - return 'fail' - - -def initdUinstall(): - if not app_debug: - if mw.isAppleSystem(): - return "Apple Computer does not support" - - _csvn = getServerDir() + '/bin/csvn' - _csvn_httpd = getServerDir() + '/bin/csvn-httpd' - - ret_csvn = mw.execShell(_csvn + ' remove') - ret_csvn_httpd = mw.execShell(_csvn_httpd + ' remove') - return 'ok' - - -def csvnEdit(): - data = {} - data['svn_access_file'] = getServerDir() + '/data/conf/svn_access_file' - data['commit_tpl'] = getPluginDir() + '/hook/commit.tpl' - data['post_commit_tpl'] = getPluginDir() + '/hook/post-commit.tpl' - return mw.getJson(data) - - -def userAdd(): - args = getArgs() - if not 'username' in args: - return 'name missing' - - if not 'password' in args: - return 'password missing' - - htpasswd = getServerDir() + "/bin/htpasswd" - svn_auth_file = getServerDir() + "/data/conf/svn_auth_file" - cmd = htpasswd + ' -b ' + svn_auth_file + ' ' + \ - args['username'] + ' ' + args['password'] - data = mw.execShell(cmd) - # print data - if data[0] == '': - return 'ok' - return 'fail' - - -def userDel(): - args = getArgs() - if not 'username' in args: - return 'name missing' - - htpasswd = getServerDir() + "/bin/htpasswd" - svn_auth_file = getServerDir() + "/data/conf/svn_auth_file" - cmd = htpasswd + ' -D ' + svn_auth_file + ' ' + args['username'] - data = mw.execShell(cmd) - if data[0] == '': - return 'ok' - return 'fail' - - -def getAllUser(search=''): - svn_auth_file = getServerDir() + '/data/conf/svn_auth_file' - if not os.path.exists(svn_auth_file): - return mw.getJson([]) - auth = mw.readFile(svn_auth_file) - auth = auth.strip() - auth_list = auth.split("\n") - - ulist = [] - for x in range(len(auth_list)): - tmp = auth_list[x].split(':') - if search != '': - if tmp[0].find(search) != -1: - ulist.append(tmp[0]) - else: - ulist.append(tmp[0]) - return ulist - - -def userList(): - import math - args = getArgs() - - page = 1 - page_size = 10 - search = '' - if 'page' in args: - page = int(args['page']) - - if 'page_size' in args: - page_size = int(args['page_size']) - - if 'search' in args: - search = args['search'] - - ulist = getAllUser(search) - ulist_sum = len(ulist) - - page_info = {'count': ulist_sum, 'p': page, - 'row': 10, 'tojs': 'csvnUserList'} - data = {} - data['list'] = mw.getPage(page_info) - data['page'] = page - data['page_size'] = page_size - data['page_count'] = int(math.ceil(ulist_sum / page_size)) - start = (page - 1) * page_size - - data['data'] = ulist[start:start + page_size] - return mw.getJson(data) - - -def projectAdd(): - args = getArgs() - if not 'name' in args: - return 'project name missing' - path = getServerDir() + '/bin/svnadmin' - dest = getServerDir() + '/data/repositories/' + args['name'] - cmd = path + ' create ' + dest - data = mw.execShell(cmd) - if data[1] == '': - mw.execShell('chown -R csvn:csvn ' + dest) - return 'ok' - return 'fail' - - -def projectDel(): - args = getArgs() - if not 'name' in args: - return 'project name missing' - - dest = getServerDir() + '/data/repositories/' + args['name'] - cmd = 'rm -rf ' + dest - data = mw.execShell(cmd) - if data[0] == '': - return 'ok' - return 'fail' - - -def getHttpPort(): - http_main_conf = getServerDir() + '/data/conf/csvn_main_httpd.conf' - try: - if os.path.exists(http_main_conf): - content = mw.readFile(http_main_conf) - return re.search('Listen\s(\d+)', content).groups()[0] - except Exception as e: - pass # print e - return '80' - - -def getCsvnPort(): - http_main_conf = getServerDir() + '/data/conf/csvn-wrapper.conf' - try: - if os.path.exists(http_main_conf): - content = mw.readFile(http_main_conf) - return re.search('wrapper.java.additional.3=-Djetty.port=(\d+)', content).groups()[0] - except Exception as e: - pass # print e - return '3343' - - -def getALlProjectList(search=''): - path = getServerDir() + '/data/repositories' - dlist = [] - if os.path.exists(path): - for filename in os.listdir(path): - tmp = {} - filePath = path + '/' + filename - if os.path.isdir(filePath): - if search == '': - tmp['name'] = filename - dlist.append(tmp) - else: - if filename.find(search) != -1: - tmp['name'] = filename - dlist.append(tmp) - return dlist - - -def checkProjectListIsHasScript(data): - dlen = len(data) - for x in range(dlen): - path = getServerDir() + '/data/repositories/' + \ - data[x]['name'] + '/hooks/post-commit' - if os.path.exists(path): - data[x]['has_hook'] = True - else: - data[x]['has_hook'] = False - - return data - - -def projectList(): - import math - args = getArgs() - - page = 1 - page_size = 10 - search = '' - if 'page' in args: - page = int(args['page']) - - if 'page_size' in args: - page_size = int(args['page_size']) - - if 'search' in args: - search = args['search'] - - dlist = getALlProjectList(search) - dlist_sum = len(dlist) - - start = (page - 1) * page_size - ret_data = dlist[start:start + page_size] - ret_data = checkProjectListIsHasScript(ret_data) - - data = {} - data['data'] = ret_data - data['list'] = mw.getPage( - {'count': dlist_sum, 'p': page, 'row': 10, 'tojs': 'csvnProjectList'}) - data['ip'] = mw.getLocalIp() - data['port'] = getHttpPort() - data['csvn_port'] = getCsvnPort() - - return mw.getJson(data) - - -def getAllAclList(): - svn_access_file = getServerDir() + '/data/conf/svn_access_file' - aData = mw.readFile(svn_access_file) - aData = re.sub('#.*', '', aData) - aData = aData.strip().split('[')[1:] - allAcl = {} - for i in range(len(aData)): - oData = aData[i].strip().split(']') - name = oData[0].strip('/').strip(':') - if oData[1] == '': - allAcl[name] = [] - else: - user = oData[1].strip().split('\n') - userAll = [] - for iu in range(len(user)): - ulist = user[iu].split('=') - utmp = {} - utmp['user'] = ulist[0].strip() - utmp['acl'] = ulist[1].strip() - userAll.append(utmp) - allAcl[name] = userAll - return allAcl - - -def makeAclFile(content): - # print content - svn_access_file = getServerDir() + '/data/conf/svn_access_file' - tmp = "\n" - for k, v in content.items(): - if k == '': - tmp += "[/]\n" - else: - tmp += "[" + k + ":/]\n" - - for iv in range(len(v)): - tmp += v[iv]['user'] + ' = ' + v[iv]['acl'] + "\n" - tmp += "\n" - # svn_tmp_path = getServerDir() + '/data/conf/svn_access_file.log' - return mw.writeFile(svn_access_file, tmp) - - -def projectAclList(): - args = getArgs() - if not 'name' in args: - return 'name missing!' - name = args['name'] - acl = getAllAclList() - - if name in acl: - return mw.getJson(acl[name]) - else: - return 'fail' - - -def projectAclAdd(): - args = getArgs() - if not 'uname' in args: - return 'username missing' - if not 'pname' in args: - return 'project name missing' - uname = args['uname'] - pname = args['pname'] - - ulist = getAllUser() - if not uname in ulist: - return uname + " user not exists!" - - acl = getAllAclList() - - tmp_acl = {'user': uname, 'acl': 'rw'} - if not pname in acl: - acl[pname] = [tmp_acl] - makeAclFile(acl) - return 'ok' - - tmp = acl[pname] - tmp_len = len(tmp) - - if tmp_len == 0: - acl[pname] = [tmp_acl] - else: - is_have = False - for x in range(tmp_len): - if tmp[x]['user'] == uname: - is_have = True - return uname + ' users already exist!' - if not is_have: - tmp.append(tmp_acl) - acl[pname] = tmp - - makeAclFile(acl) - return 'ok' - - -def projectAclDel(): - args = getArgs() - if not 'uname' in args: - return 'username missing' - if not 'pname' in args: - return 'project name missing' - - uname = args['uname'] - pname = args['pname'] - - ulist = getAllUser() - if not uname in ulist: - return uname + " user not exists!" - - acl = getAllAclList() - - if not pname in acl: - return 'project not exists!' - - tmp = acl[pname] - tmp_len = len(tmp) - if tmp_len == 0: - return 'project no have user:' + uname - else: - is_have = False - rtmp = [] - for x in range(tmp_len): - if tmp[x]['user'] != uname: - rtmp.append(tmp[x]) - acl[pname] = rtmp - makeAclFile(acl) - return 'ok' - - -def projectAclSet(): - args = getArgs() - if not 'uname' in args: - return 'username missing' - if not 'pname' in args: - return 'project name missing' - if not 'acl' in args: - return 'acl missing' - - uname = args['uname'] - pname = args['pname'] - up_acl = args['acl'] - - ulist = getAllUser() - if not uname in ulist: - return uname + " user not exists!" - - acl = getAllAclList() - - if not pname in acl: - return 'project not exists!' - - tmp = acl[pname] - tmp_len = len(tmp) - if tmp_len == 0: - return 'project no have user:' + uname - else: - is_have = False - for x in range(tmp_len): - if tmp[x]['user'] == uname: - tmp[x]['acl'] = up_acl - acl[pname] = tmp - makeAclFile(acl) - return 'ok' - - -def getCsvnUser(): - user = 'admin_sync' - - acl = getAllAclList() - if '' in acl: - tmp = acl[''] - is_has = False - for data in tmp: - if data['user'] == user: - is_has = True - if not is_has: - tmp.append({'user': user, 'acl': 'r'}) - acl[''] = tmp - makeAclFile(acl) - return user - - -def getCsvnPwd(user): - if app_debug: - return user + '123' - pwd_file = 'data/csvn_sync.pl' - - if os.path.exists(pwd_file): - return mw.readFile(pwd_file).strip() - - import time - cur_time = time.time() - rand_pwd = mw.md5(str(cur_time)) - pwd = user + rand_pwd[:5] - - htpasswd = getServerDir() + "/bin/htpasswd" - svn_auth_file = getServerDir() + "/data/conf/svn_auth_file" - cmd = htpasswd + ' -b ' + svn_auth_file + ' ' + user + ' ' + pwd - data = mw.execShell(cmd) - - mw.writeFile(pwd_file, pwd) - return pwd - - -def projectScriptLoad(): - - args = getArgs() - if not 'pname' in args: - return 'project name missing' - - post_commit_tpl = getPluginDir() + '/hook/post-commit.tpl' - hook_path = getServerDir() + '/data/repositories/' + \ - args['pname'] + '/hooks' - post_commit_file = hook_path + '/post-commit' - - pct_content = mw.readFile(post_commit_tpl) - mw.writeFile(post_commit_file, pct_content) - mw.execShell('chmod 777 ' + post_commit_file) - - commit_tpl = getPluginDir() + '/hook/commit.tpl' - commit_file = hook_path + '/commit' - - ct_content = mw.readFile(commit_tpl) - ct_content = ct_content.replace('{$PROJECT_DIR}', mw.getRootDir()) - ct_content = ct_content.replace('{$PORT}', getHttpPort()) - ct_content = ct_content.replace('{$CSVN_USER}', getCsvnUser()) - ct_content = ct_content.replace('{$CSVN_PWD}', getCsvnPwd(getCsvnUser())) - - mw.writeFile(commit_file, ct_content) - mw.execShell('chmod 777 ' + commit_file) - - return 'ok' - - -def projectScriptUnload(): - args = getArgs() - if not 'pname' in args: - return 'project name missing' - - post_commit_file = getServerDir() + '/data/repositories/' + '/' + \ - args['pname'] + '/hooks/post-commit' - mw.execShell('rm -f ' + post_commit_file) - - commit_file = getServerDir() + '/data/repositories/' + '/' + \ - args['pname'] + '/hooks/commit' - mw.execShell('rm -f ' + commit_file) - return 'ok' - - -def projectScriptEdit(): - args = getArgs() - if not 'pname' in args: - return 'project name missing' - - data = {} - commit_file = getServerDir() + '/data/repositories/' + \ - args['pname'] + '/hooks/commit' - if os.path.exists(commit_file): - data['status'] = True - data['path'] = commit_file - else: - data['status'] = False - data['msg'] = 'file does not exist' - - return mw.getJson(data) - - -def projectScriptDebug(): - args = getArgs() - if not 'pname' in args: - return 'project name missing' - - data = {} - commit_log = getServerDir() + '/data/repositories/' + \ - args['pname'] + '/sh.log' - if os.path.exists(commit_log): - data['status'] = True - data['path'] = commit_log - else: - data['status'] = False - data['msg'] = 'file does not exist' - - return mw.getJson(data) - - -def getTotalStatistics(): - st = status() - data = {} - if st == 'start': - svn_path = getServerDir() + '/data/repositories' - data['status'] = True - data['count'] = len(os.listdir(svn_path)) - data['ver'] = mw.readFile(getServerDir() + '/version.pl').strip() - return mw.returnJson(True, 'ok', data) - else: - data['status'] = False - data['count'] = 0 - return mw.returnJson(False, 'fail', data) - - -if __name__ == "__main__": - func = sys.argv[1] - if func == 'status': - print(status()) - elif func == 'start': - print(start()) - elif func == 'stop': - print(stop()) - elif func == 'restart': - print(restart()) - elif func == 'reload': - print(reload()) - elif func == 'initd_status': - print(initdStatus()) - elif func == 'initd_install': - print(initdInstall()) - elif func == 'initd_uninstall': - print(initdUinstall()) - elif func == 'csvn_edit': - print(csvnEdit()) - elif func == 'user_list': - print(userList()) - elif func == 'user_add': - print(userAdd()) - elif func == 'user_del': - print(userDel()) - elif func == 'project_list': - print(projectList()) - elif func == 'project_del': - print(projectDel()) - elif func == 'project_add': - print(projectAdd()) - elif func == 'project_acl_list': - print(projectAclList()) - elif func == 'project_acl_add': - print(projectAclAdd()) - elif func == 'project_acl_del': - print(projectAclDel()) - elif func == 'project_acl_set': - print(projectAclSet()) - elif func == 'project_script_load': - print(projectScriptLoad()) - elif func == 'project_script_unload': - print(projectScriptUnload()) - elif func == 'project_script_edit': - print(projectScriptEdit()) - elif func == 'project_script_debug': - print(projectScriptDebug()) - elif func == 'get_total_statistics': - print(getTotalStatistics()) - else: - print('fail') diff --git a/plugins/csvn/info.json b/plugins/csvn/info.json deleted file mode 100755 index 422ec52b6..000000000 --- a/plugins/csvn/info.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "sort": 7, - "ps": "最流行的SVN代码共享管理软件", - "shell": "install.sh", - "name": "csvn", - "title": "CSVN", - "versions": "5.1", - "updates":"5.1.4", - "tip": "soft", - "checks": "server/csvn", - "path":"server/csvn", - "author": "midoks", - "date": "2017-04-01", - "home": "https://www.collab.net", - "type": "SVN代码共享管理软件", - "pid": "3" -} \ No newline at end of file diff --git a/plugins/csvn/install.sh b/plugins/csvn/install.sh deleted file mode 100755 index 763e3e771..000000000 --- a/plugins/csvn/install.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -# https://blog.csdn.net/akipa11/article/details/103455298 -# https://blog.csdn.net/bbj12345678/article/details/122941395 - -curPath=`pwd` -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -serverPath=$(dirname "$rootPath") - -install_tmp=${rootPath}/tmp/mw_install.pl - - -sysName=`uname` -echo "use system: ${sysName}" - -if [ ${sysName} == "Darwin" ]; then - OSNAME='macos' -elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then - OSNAME='centos' -elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then - OSNAME='fedora' -elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then - OSNAME='debian' -elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then - OSNAME='ubuntu' -elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then - OSNAME='raspbian' -else - OSNAME='unknow' -fi - - -CheckJAVA() -{ - which "java" > /dev/null - if [ $? -eq 0 ] - then - echo 'java is exist' - elif [ "ubuntu" == "$OSNAME" ] || [ "debian" == "$OSNAME" ] ;then - echo 'java install...' - apt install -y default-jdk - - export JAVA_HOME=/usr/lib/jvm/default-java - else - echo 'java install...' - yum install -y java - fi -} - -# export JAVA_HOME=/usr/lib/jvm/default-java -#JAVA_BIN=/usr/lib/jvm/default-java/bin -#JRE_HOME=/usr/lib/jvm/default-java/jre -#PATH=$PATH:/usr/lib/jvm/default-java/bin:/usr/lib/jvm/default-java/jre/bin -#CLASSPATH=/usr/lib/jvm/default-java/jre/lib:/usr/lib/jvm/default-java/lib:/usr/lib/jvm/default-java/jre/lib/charsets.jar - - -Install_csvn() -{ - CheckJAVA - mkdir -p $serverPath/source - - echo '正在安装脚本文件...' > $install_tmp - - CSVN_SOURCE='https://github.com/midoks/mdserver-web/releases/download/init/CollabNetSubversionEdge-5.1.4_linux-x86_64.tar.xz' - - if [ ! -f $serverPath/source/csvn.tar.xz ];then - wget -O $serverPath/source/csvn.tar.xz ${CSVN_SOURCE} - fi - - cd $serverPath/source && tar -Jxf $serverPath/source/csvn.tar.xz - mv $serverPath/source/csvn $serverPath/csvn - echo '5.1' > $serverPath/csvn/version.pl - - - if id -u csvn > /dev/null 2>&1; then - echo "csvn user exists" - else - groupadd csvn - useradd -g csvn csvn - cp /etc/sudoers{,.`date +"%Y-%m-%d_%H-%M-%S"`} - echo "csvn ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers - fi - - chown -R csvn:csvn $serverPath/csvn - - $serverPath/csvn/bin/csvn install - $serverPath/csvn/bin/csvn-httpd install - - echo '安装完成' > $install_tmp -} - -Uninstall_csvn() -{ - rm -rf $serverPath/csvn -} - - -action=$1 -host=$2 -if [ "${1}" == 'install' ];then - Install_csvn -else - Uninstall_csvn -fi diff --git a/plugins/csvn/js/csvn.js b/plugins/csvn/js/csvn.js deleted file mode 100755 index 5df2d6d41..000000000 --- a/plugins/csvn/js/csvn.js +++ /dev/null @@ -1,500 +0,0 @@ -pluginService('csvn'); - -function csvnPost(method,args,callback){ - var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 }); - $.post('/plugins/run', {name:'csvn', func:method, args:JSON.stringify(args)}, function(data) { - layer.close(loadT); - if (!data.status){ - layer.msg(data.msg,{icon:0,time:2000,shade: [0.3, '#000']}); - return; - } - - if(typeof(callback) == 'function'){ - callback(data); - } - },'json'); -} - - - -function csvnEdit(){ - - csvnPost('csvn_edit',{} , function(data){ - // console.log(data); - var rdata = $.parseJSON(data.data); - var edit = '

    通用的手动编辑:

    '; - edit +='
    \ - \ - \ - \ -
    '; - $(".soft-man-con").html(edit); - }); - -} - - -function csvnUserFind(){ - var search = $('#csvn_find_user').val(); - if (search==''){ - layer.msg('搜索字符不能为空!',{icon:0,time:2000,shade: [0.3, '#000']}); - return; - } - csvnUserList(1, search); -} - -function csvnUserList(page, search) { - - var _data = {}; - if (typeof(page) =='undefined'){ - var page = 1; - } - - _data['page'] = page; - _data['page_size'] = 10; - if(typeof(search) != 'undefined'){ - _data['search'] = search; - } - - csvnPost('user_list', _data, function(data){ - - var rdata = $.parseJSON(data.data); - // console.log(rdata); - content = '
    '; - content += '
    '; - - content += '
    '; - content += ''; - content += ''; - content += ''; - content += ''; - - content += ''; - - ulist = rdata.data; - for (i in ulist){ - content += ''; - } - - content += ''; - content += '
    用户名操作(添加)
    '+ulist[i]+''+ - '删除 | ' + - '改密
    '; - - page = ''; - - content += page; - - $(".soft-man-con").html(content); - }); -} - -function csvnDelUser(name){ - var loadOpen = layer.open({ - type: 1, - title: '删除用户', - area: '350px', - content:"
    \ -
    你要确认要删除"+ name + "账户?
    \ -
    \ - \ - \ -
    \ -
    " - }); - - $('#csvn_del_close').click(function(){ - layer.close(loadOpen); - }); - - $('#csvn_del_ok').click(function(){ - _data = {}; - _data['username'] = name; - var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 }); - $.post('/plugins/run', {name:'csvn', func:'user_del', args:JSON.stringify(_data)}, function(data) { - layer.close(loadT); - if (!data.status){ - layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']}); - return; - } - - if (data.data !='ok'){ - layer.msg(data.data,{icon:2,time:2000,shade: [0.3, '#000']}); - } - - layer.close(loadOpen); - layer.msg("删除成功!",{icon:1,time:3000,shade: [0.3, '#000']}); - - },'json'); - }); -} - -function csvnAddUser(username){ - - user_input = '' - if (typeof(username) == 'undefined'){ - user_input = "
    "; - } else { - user_input = "
    "; - } - - var loadOpen = layer.open({ - type: 1, - title: '添加用户', - area: '240px', - content:"
    \ -
    \ - "+user_input+"\ -
    \ -
    \ -
    \ - \ - \ -
    \ -
    " - }); - - $('#csvn_add_close').click(function(){ - layer.close(loadOpen); - }); - - $('#csvn_add_ok').click(function(){ - _data = {}; - - _data['username'] = $('#csvn_username').val(); - _data['password'] = $('#csvn_password').val(); - - var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 }); - $.post('/plugins/run', {name:'csvn', func:'user_add', args:JSON.stringify(_data)}, function(data) { - layer.close(loadT); - if (!data.status){ - layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']}); - return; - } - - if (data.data !='ok'){ - layer.msg(data.data,{icon:2,time:2000,shade: [0.3, '#000']}); - } - - csvnUserList(); - layer.close(loadOpen); - layer.msg("操作成功!",{icon:1,time:3000,shade: [0.3, '#000']}); - },'json'); - }); -} - -function csvnModPwdUser(name){ - csvnAddUser(name); -} - -function csvnProjectFind(){ - var search = $('#csvn_project_find').val(); - if (search == ''){ - layer.msg('查找字符不能为空!',{icon:0,time:2000,shade: [0.3, '#000']}); - return; - } - - csvnProjectList(1, search); -} - -function csvnProjectList(page, search){ - var _data = {}; - _data['page_size'] = 10; - if (typeof(search) != 'undefined'){ - _data['search'] = search; - } - - if (typeof(page) != 'undefined'){ - _data['page'] = page; - setCookie('csvnProjectListPage',page); - } else { - _data['page'] = 1; - cookie_page = getCookie('csvnProjectListPage') - if (cookie_page >0){ - _data['page'] = cookie_page; - } - } - - csvnPost('project_list', _data, function(data){ - - var rdata = $.parseJSON($.trim(data.data)); - var csvn_mg = project_url = 'http://' +rdata['ip'] +(rdata['csvn_port'] == '80' ? '': ':'+rdata['csvn_port']); - - content = '
    '; - content += '
    '; - - content += '
    '; - content += ''; - content += ''; - content += ''; - content += ''; - content += ''; - content += ''; - - // console.log(rdata); - ulist = rdata.data; - for (i in ulist){ - var project_url = 'http://' +rdata['ip'] +(rdata['port'] == '80' ? '': ':'+rdata['port'])+ '/svn/'+ulist[i]['name']; - var code_url = 'http://' +rdata['ip'] +(rdata['port'] == '80' ? '': ':'+rdata['port'])+ '/viewvc/'+ulist[i]['name']; - content += ''+ - ''; - } - - content += ''; - content += '
    项目名地址操作(添加) | 后台管理
    '+ulist[i]['name']+''+project_url+''+ - '删除 | ' + - '权限 | ' + - '源码 | ' + - '脚本' + - '
    '; - - page = ''; - - content += page; - $(".soft-man-con").html(content); - }); -} - -function csvnDelProject(name){ - var loadOpen = layer.open({ - type: 1, - title: '删除用户', - area: '350px', - content:"
    \ -
    你要确认要删除"+ name + "账户?
    \ -
    \ - \ - \ -
    \ -
    " - }); - - $('#csvn_del_close').click(function(){ - layer.close(loadOpen); - }); - - $('#csvn_del_ok').click(function(){ - var _data = {}; - _data['name'] = name; - var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 }); - $.post('/plugins/run', {name:'csvn', func:'project_del', args:JSON.stringify(_data)}, function(data) { - layer.close(loadT); - if (!data.status){ - layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']}); - return; - } - - if (data.data !='ok'){ - layer.msg(data.data,{icon:2,time:2000,shade: [0.3, '#000']}); - return; - } - - csvnProjectList(); - layer.close(loadOpen); - layer.msg("删除成功!",{icon:1,time:3000,shade: [0.3, '#000']}); - },'json'); - }); -} - -function csvnAddProject(){ - - var loadOpen = layer.open({ - type: 1, - title: '添加项目', - area: '240px', - content:"
    \ -
    \ -
    \ -
    \ -
    \ - \ - \ -
    \ -
    " - }); - - $('#csvn_project_close').click(function(){ - layer.close(loadOpen); - }); - - $('#csvn_project_ok').click(function(){ - var _data = {}; - _data['name'] = $('#csvn_name').val(); - - csvnPost('project_add', _data, function(data){ - - if (data.data !='ok'){ - layer.msg(data.data,{icon:2,time:2000,shade: [0.3, '#000']}); - return; - } - - csvnProjectList(); - layer.close(loadOpen); - layer.msg("操作成功!",{icon:1,time:3000,shade: [0.3, '#000']}); - }); - }); -} - - -function csvnProjectScript(pname, has_hook){ - - var html = ''; - if (has_hook){ - html += ''; - html += ''; - html += ''; - html += ''; - } else { - html += ''; - } - - var loadOpen = layer.open({ - type: 1, - title: '脚本设置', - area: '240px', - content:'
    '+html+'
    ' - }); -} - -function csvnProjectScriptLoad(pname){ - csvnPost('project_script_load', {'pname':pname}, function(data){ - if (data.data != 'ok'){ - layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']}); - return; - } - - layer.msg('加载成功!',{icon:1,time:2000,shade: [0.3, '#000']}); - setTimeout(function(){ - csvnProjectList(); - },2000); - }); -} - -function csvnProjectScriptUnload(pname){ - csvnPost('project_script_unload', {'pname':pname}, function(data){ - if (data.data != 'ok'){ - layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']}); - return; - } - - layer.msg('卸载成功!',{icon:1,time:2000,shade: [0.3, '#000']}); - setTimeout(function(){ - csvnProjectList(); - },2000); - }); -} - -function csvnProjectScriptEdit(pname){ - csvnPost('project_script_edit', {'pname':pname}, function(data){ - var rdata = $.parseJSON(data.data); - if (rdata['status']){ - onlineEditFile(0, rdata['path']); - csvnProjectList(); - } else { - layer.msg(rdata.msg,{icon:1,time:2000,shade: [0.3, '#000']}); - } - }); -} - -function csvnProjectScriptDebug(pname){ - csvnPost('project_script_debug', {'pname':pname}, function(data){ - var rdata = $.parseJSON(data.data); - if (rdata['status']){ - onlineEditFile(0, rdata['path']); - csvnProjectList(); - } else { - layer.msg(rdata.msg,{icon:1,time:2000,shade: [0.3, '#000']}); - } - }); -} - - -function csvnAclAdd(pname){ - var uname = $('#csvn_username').val(); - if (uname == ''){ - layer.msg('添加用户名不能为空!',{icon:0,time:2000,shade: [0.3, '#000']}); - return; - } - - csvnPost('project_acl_add', {'pname':pname,'uname':uname}, function(data){ - if (data.data != 'ok'){ - layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']}); - return; - } - $('.layui-layer-close1').click(); - csvnAclProject(pname); - }); -} - -function csvnAclDel(pname, uname){ - csvnPost('project_acl_del', {'pname':pname,'uname':uname}, function(data){ - if (data.data != 'ok'){ - layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']}); - return; - } - $('.layui-layer-close1').click(); - csvnAclProject(pname); - }); -} - -function csvnAclSet(obj, pname, uname, acl, selected){ - - if (selected){ - $(obj).prop('checked',true); - layer.msg('权限没有变化!',{icon:0,time:2000,shade: [0.3, '#000']}); - return; - } - - csvnPost('project_acl_set', {'pname':pname,'uname':uname, 'acl':acl}, function(data){ - if (data.data != 'ok'){ - layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']}); - return; - } - - $('.layui-layer-close1').click(); - csvnAclProject(pname); - }); -} - -function csvnAclProject(pname){ - csvnPost('project_acl_list', {'name':pname}, function(data){ - - var rdata = []; - try { - rdata = $.parseJSON(data.data); - } catch(e){} - - var list = ''; - for (i in rdata) { - var user = rdata[i]['user']; - var acl = ''; - if (rdata[i]['acl'] == 'r'){ - acl += ' 只读 | 读写'; - } else { - acl += ' 只读 | 读写'; - } - - list += ''+user+'' + acl +''+ - '删除'+''; - } - - var loadOpen = layer.open({ - type: 1, - title: '项目('+pname+')权限设置', - area: '300px', - content:"
    \ -
    \ -
    \ -
    \ -
    \ - "+list+"\ -
    用户权限操作
    \ -
    \ -
    " - }); - }); -} \ No newline at end of file From c64d77c48f25fc39cc154f8463baee1d93986446 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 18:32:02 +0800 Subject: [PATCH 183/263] Update site.js --- route/static/app/site.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route/static/app/site.js b/route/static/app/site.js index c5072888c..f3aac26de 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -1793,7 +1793,7 @@ function toProxy(siteName, type, obj) { '+item.from+'\ '+item.to+'\ \ - 详情 |\ + 详细 |\ 删除\ \ '; From e25ef09a205243d0d6c360a24ab5004c5e5251f6 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 18:56:13 +0800 Subject: [PATCH 184/263] add freebsd --- scripts/install.sh | 2 + scripts/install/freebsd.sh | 80 ++++++++++++++++++++++++++++++++++++++ scripts/install_cn.sh | 2 + scripts/install_dev.sh | 2 + scripts/update.sh | 2 + scripts/update/freebsd.sh | 77 ++++++++++++++++++++++++++++++++++++ scripts/update_cn.sh | 2 + scripts/update_dev.sh | 2 + 8 files changed, 169 insertions(+) create mode 100644 scripts/install/freebsd.sh create mode 100644 scripts/update/freebsd.sh diff --git a/scripts/install.sh b/scripts/install.sh index c923ed805..c90e56a46 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -33,6 +33,8 @@ if [ ${_os} == "Darwin" ]; then elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' zypper refresh +elif grep -Eq "FreeBSD" /etc/*-release; then + OSNAME='freebsd' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh new file mode 100644 index 000000000..7bf9606de --- /dev/null +++ b/scripts/install/freebsd.sh @@ -0,0 +1,80 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH +LANG=en_US.UTF-8 + + +pkg install -y python3 + + +#https need +if [ ! -d /root/.acme.sh ];then + curl https://get.acme.sh | sh +fi + +if [ -f /etc/init.d/iptables ];then + + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT + # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT + # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT + service iptables save + + iptables_status=`service iptables status | grep 'not running'` + if [ "${iptables_status}" == '' ];then + service iptables restart + fi + + #安装时不开启 + service iptables stop +fi + + +if [ ! -f /etc/init.d/iptables ];then + zypper install -y firewalld + systemctl enable firewalld + systemctl start firewalld + + firewall-cmd --permanent --zone=public --add-port=22/tcp + firewall-cmd --permanent --zone=public --add-port=80/tcp + firewall-cmd --permanent --zone=public --add-port=443/tcp + firewall-cmd --permanent --zone=public --add-port=888/tcp + firewall-cmd --permanent --zone=public --add-port=7200/tcp + # firewall-cmd --permanent --zone=public --add-port=3306/tcp + # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp + + + sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf + firewall-cmd --reload + #安装时不开启 + systemctl stop firewalld +fi + + + + +cd /www/server/mdserver-web/scripts && bash lib.sh +chmod 755 /www/server/mdserver-web/data + + +cd /www/server/mdserver-web && ./cli.sh start +isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` +n=0 +while [[ ! -f /etc/init.d/mw ]]; +do + echo -e ".\c" + sleep 1 + let n+=1 + if [ $n -gt 20 ];then + echo -e "start mw fail" + exit 1 + fi +done + +cd /www/server/mdserver-web && /etc/init.d/mw stop +cd /www/server/mdserver-web && /etc/init.d/mw start +cd /www/server/mdserver-web && /etc/init.d/mw default + diff --git a/scripts/install_cn.sh b/scripts/install_cn.sh index 04f8c18aa..9f5e43c26 100755 --- a/scripts/install_cn.sh +++ b/scripts/install_cn.sh @@ -33,6 +33,8 @@ if [ ${_os} == "Darwin" ]; then elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' zypper refresh +elif grep -Eq "FreeBSD" /etc/*-release; then + OSNAME='freebsd' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index c81f1f5c4..c50351f1c 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -33,6 +33,8 @@ if [ ${_os} == "Darwin" ]; then elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' zypper refresh +elif grep -Eq "FreeBSD" /etc/*-release; then + OSNAME='freebsd' elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then OSNAME='arch' echo y | pacman -Sy unzip diff --git a/scripts/update.sh b/scripts/update.sh index 2435a6778..d66942575 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -28,6 +28,8 @@ if [ ${_os} == "Darwin" ]; then elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' zypper refresh +elif grep -Eq "FreeBSD" /etc/*-release; then + OSNAME='freebsd' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip diff --git a/scripts/update/freebsd.sh b/scripts/update/freebsd.sh new file mode 100644 index 000000000..06ccadc27 --- /dev/null +++ b/scripts/update/freebsd.sh @@ -0,0 +1,77 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH +LANG=en_US.UTF-8 + + +#https need +if [ ! -d /root/.acme.sh ];then + curl https://get.acme.sh | sh +fi + +if [ -f /etc/init.d/iptables ];then + + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT + iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT + # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT + # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT + service iptables save + + iptables_status=`service iptables status | grep 'not running'` + if [ "${iptables_status}" == '' ];then + service iptables restart + fi + + #安装时不开启 + service iptables stop +fi + + +if [ ! -f /etc/init.d/iptables ];then + zypper install -y firewalld + systemctl enable firewalld + systemctl start firewalld + + firewall-cmd --permanent --zone=public --add-port=22/tcp + firewall-cmd --permanent --zone=public --add-port=80/tcp + firewall-cmd --permanent --zone=public --add-port=443/tcp + firewall-cmd --permanent --zone=public --add-port=888/tcp + firewall-cmd --permanent --zone=public --add-port=7200/tcp + # firewall-cmd --permanent --zone=public --add-port=3306/tcp + # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp + + + sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf + firewall-cmd --reload + #安装时不开启 + systemctl stop firewalld +fi + + + + +cd /www/server/mdserver-web/scripts && bash lib.sh +chmod 755 /www/server/mdserver-web/data + + +cd /www/server/mdserver-web && ./cli.sh start +isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` +n=0 +while [[ ! -f /etc/init.d/mw ]]; +do + echo -e ".\c" + sleep 1 + let n+=1 + if [ $n -gt 20 ];then + echo -e "start mw fail" + exit 1 + fi +done + +cd /www/server/mdserver-web && /etc/init.d/mw stop +cd /www/server/mdserver-web && /etc/init.d/mw start +cd /www/server/mdserver-web && /etc/init.d/mw default + diff --git a/scripts/update_cn.sh b/scripts/update_cn.sh index 6e44bccfe..a76824af6 100755 --- a/scripts/update_cn.sh +++ b/scripts/update_cn.sh @@ -28,6 +28,8 @@ if [ ${_os} == "Darwin" ]; then elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' zypper refresh +elif grep -Eq "FreeBSD" /etc/*-release; then + OSNAME='freebsd' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index b8a558dbc..45f3de803 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -28,6 +28,8 @@ if [ ${_os} == "Darwin" ]; then elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' zypper refresh +elif grep -Eq "FreeBSD" /etc/*-release; then + OSNAME='freebsd' elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then OSNAME='arch' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then From 1aaaf429c3ebe8bf26f08266908aa8d9b5aa070d Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 18:57:32 +0800 Subject: [PATCH 185/263] Update install_dev.sh --- scripts/install_dev.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index c50351f1c..c10b5d940 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -35,6 +35,7 @@ elif grep -Eq "openSUSE" /etc/*-release; then zypper refresh elif grep -Eq "FreeBSD" /etc/*-release; then OSNAME='freebsd' + pkg install -u wget unzip elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then OSNAME='arch' echo y | pacman -Sy unzip From 98ab08c53291433ef5dbc2d6b951f8ceb19abed1 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:00:50 +0800 Subject: [PATCH 186/263] Update freebsd.sh --- scripts/install/freebsd.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index 7bf9606de..9f815c9e0 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -5,6 +5,7 @@ LANG=en_US.UTF-8 pkg install -y python3 +pkg install -y python3-pip #https need From 8062dd3ed72490278a8ca50bb82cffc71bb3bf60 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:06:57 +0800 Subject: [PATCH 187/263] Update freebsd.sh --- scripts/install/freebsd.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index 9f815c9e0..c10773ad3 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -8,6 +8,8 @@ pkg install -y python3 pkg install -y python3-pip +pkg autoremove -y + #https need if [ ! -d /root/.acme.sh ];then curl https://get.acme.sh | sh From 79732307714d25da020d42b9b74f1dc964ba739f Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:10:47 +0800 Subject: [PATCH 188/263] Update freebsd.sh --- scripts/install/freebsd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index c10773ad3..1a69dd7fd 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -37,7 +37,7 @@ fi if [ ! -f /etc/init.d/iptables ];then - zypper install -y firewalld + pkg install -y firewalld systemctl enable firewalld systemctl start firewalld From 6266dc0528115346897c22315c14ac848e7cfaeb Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:13:22 +0800 Subject: [PATCH 189/263] Update freebsd.sh --- scripts/install/freebsd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index 1a69dd7fd..ab9670cb6 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -3,7 +3,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH LANG=en_US.UTF-8 - +pkg update -y pkg install -y python3 pkg install -y python3-pip From b925c7f955e5bb90bf8685d0e27fa2ac9ca66dda Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:14:18 +0800 Subject: [PATCH 190/263] Update freebsd.sh --- scripts/install/freebsd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index ab9670cb6..9438a7e86 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -5,7 +5,7 @@ LANG=en_US.UTF-8 pkg update -y pkg install -y python3 -pkg install -y python3-pip +python3 -m ensurepip pkg autoremove -y From db83fb771c7681d28811bf7214bb1cdeca6348b3 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:15:09 +0800 Subject: [PATCH 191/263] Update lib.sh --- scripts/lib.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/lib.sh b/scripts/lib.sh index 3c89f4984..4ee55fda3 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -232,6 +232,8 @@ if [ ${_os} == "Darwin" ]; then OSNAME='macos' elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' +elif grep -Eq "FreeBSD" /etc/*-release; then + OSNAME='freebsd' elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then OSNAME='arch' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then @@ -273,6 +275,8 @@ elif [ "$OSNAME" == "opensuse" ];then echo "opensuse lib" elif [ "$OSNAME" == "arch" ];then echo "arch lib" +elif [ "$OSNAME" == "freebsd" ];then + echo "freebsd lib" elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y devscripts From 428ef4be3540d2a83ccc70127a065510e40a3be7 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:16:10 +0800 Subject: [PATCH 192/263] Update freebsd.sh --- scripts/install/freebsd.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index 9438a7e86..bd42b9708 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -6,6 +6,7 @@ LANG=en_US.UTF-8 pkg update -y pkg install -y python3 python3 -m ensurepip +pip3 install --upgrade setuptools pkg autoremove -y From 764ebdeddbc2b89b59af437183dbdc11ed8f7969 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:17:56 +0800 Subject: [PATCH 193/263] Update freebsd.sh --- scripts/install/freebsd.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index bd42b9708..1326bb641 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -7,6 +7,7 @@ pkg update -y pkg install -y python3 python3 -m ensurepip pip3 install --upgrade setuptools +pkg install -y lsof pkg autoremove -y From 03d6404e57f706f43496b6a71622bc50393311d0 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:20:59 +0800 Subject: [PATCH 194/263] Update freebsd.sh --- scripts/install/freebsd.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index 1326bb641..4d0efb5e8 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -8,6 +8,7 @@ pkg install -y python3 python3 -m ensurepip pip3 install --upgrade setuptools pkg install -y lsof +pkg install -y mysql-devel pkg autoremove -y @@ -65,7 +66,7 @@ cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data -cd /www/server/mdserver-web && ./cli.sh start +cd /www/server/mdserver-web && bash cli.sh start isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` n=0 while [[ ! -f /etc/init.d/mw ]]; From 2eace53fa6fba47abbef217092bd11700ea7a600 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:23:56 +0800 Subject: [PATCH 195/263] Update freebsd.sh --- scripts/install/freebsd.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index 4d0efb5e8..20cf29bb5 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -8,7 +8,8 @@ pkg install -y python3 python3 -m ensurepip pip3 install --upgrade setuptools pkg install -y lsof -pkg install -y mysql-devel +pkg install -y sqlite3 + pkg autoremove -y From a6f552691d305837221c71a449876d865ef2ab50 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:30:22 +0800 Subject: [PATCH 196/263] Update freebsd.sh --- scripts/install/freebsd.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index 20cf29bb5..ff395ede2 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -10,6 +10,12 @@ pip3 install --upgrade setuptools pkg install -y lsof pkg install -y sqlite3 +pkg install -y gcc +pkg install -y autoconf +pkg install -y make cmake + + +pkg install -y libsqlite3-devel pkg autoremove -y From 9e99319570a657657503f15ea61b318958e53285 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:32:28 +0800 Subject: [PATCH 197/263] Update freebsd.sh --- scripts/install/freebsd.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index ff395ede2..7de5739ef 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -7,6 +7,7 @@ pkg update -y pkg install -y python3 python3 -m ensurepip pip3 install --upgrade setuptools +python3 -m pip install --upgrade pip pkg install -y lsof pkg install -y sqlite3 From b8e1aa1612f3c3bab9754e67972ea5048a2cdcc6 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:55:13 +0800 Subject: [PATCH 198/263] up --- route/__init__.py | 2 +- scripts/install/freebsd.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/route/__init__.py b/route/__init__.py index d1e3863a6..ad16a8c77 100755 --- a/route/__init__.py +++ b/route/__init__.py @@ -53,7 +53,7 @@ except: str(sys.version_info[0]) app.config['SESSION_FILE_THRESHOLD'] = 1024 app.config['SESSION_FILE_MODE'] = 384 - mw.execShell("pip install flask_sqlalchemy &") + # mw.execShell("pip install flask_sqlalchemy &") app.secret_key = uuid.UUID(int=uuid.getnode()).hex[-12:] app.config['SESSION_PERMANENT'] = True diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index 7de5739ef..ffbae6b9d 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -11,10 +11,12 @@ python3 -m pip install --upgrade pip pkg install -y lsof pkg install -y sqlite3 +pkg install py38-sqlite3 + pkg install -y gcc pkg install -y autoconf pkg install -y make cmake - +pkg install -y libxslt pkg install -y libsqlite3-devel From 4dfcbd609cebcdb140d049993a9571c75cea4f7d Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:58:07 +0800 Subject: [PATCH 199/263] Update freebsd.sh --- scripts/update/freebsd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update/freebsd.sh b/scripts/update/freebsd.sh index 06ccadc27..4d6e81d2c 100644 --- a/scripts/update/freebsd.sh +++ b/scripts/update/freebsd.sh @@ -57,7 +57,7 @@ cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data -cd /www/server/mdserver-web && ./cli.sh start +cd /www/server/mdserver-web && bash cli.sh start isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` n=0 while [[ ! -f /etc/init.d/mw ]]; From 75f00ba39e08d69a306e927cc050ee45686e9bac Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 19:58:34 +0800 Subject: [PATCH 200/263] Update freebsd.sh --- scripts/update/freebsd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update/freebsd.sh b/scripts/update/freebsd.sh index 4d6e81d2c..568fdc106 100644 --- a/scripts/update/freebsd.sh +++ b/scripts/update/freebsd.sh @@ -31,7 +31,7 @@ fi if [ ! -f /etc/init.d/iptables ];then - zypper install -y firewalld + pkg install -y firewalld systemctl enable firewalld systemctl start firewalld From f9433e2392b58f5584b12590fab8fb75802cc661 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 20:15:38 +0800 Subject: [PATCH 201/263] Update __init__.py --- route/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route/__init__.py b/route/__init__.py index ad16a8c77..d1e3863a6 100755 --- a/route/__init__.py +++ b/route/__init__.py @@ -53,7 +53,7 @@ except: str(sys.version_info[0]) app.config['SESSION_FILE_THRESHOLD'] = 1024 app.config['SESSION_FILE_MODE'] = 384 - # mw.execShell("pip install flask_sqlalchemy &") + mw.execShell("pip install flask_sqlalchemy &") app.secret_key = uuid.UUID(int=uuid.getnode()).hex[-12:] app.config['SESSION_PERMANENT'] = True From a51206f5c723fd7512870a383e3f61125e8e6908 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 20:19:15 +0800 Subject: [PATCH 202/263] 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 c10b5d940..03c20fdcc 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -35,7 +35,7 @@ elif grep -Eq "openSUSE" /etc/*-release; then zypper refresh elif grep -Eq "FreeBSD" /etc/*-release; then OSNAME='freebsd' - pkg install -u wget unzip + pkg install -y wget unzip elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then OSNAME='arch' echo y | pacman -Sy unzip From a33ab0fe3776e46064edd6dd1d38ef9193728b02 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 20:35:41 +0800 Subject: [PATCH 203/263] Update freebsd.sh --- scripts/install/freebsd.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index ffbae6b9d..9daa4f0da 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -10,15 +10,13 @@ pip3 install --upgrade setuptools python3 -m pip install --upgrade pip pkg install -y lsof pkg install -y sqlite3 - -pkg install py38-sqlite3 +pkg install -y py38-sqlite3 pkg install -y gcc pkg install -y autoconf pkg install -y make cmake pkg install -y libxslt - -pkg install -y libsqlite3-devel +pkg install -y libunwind pkg autoremove -y From b2c6326e7f6a6ae01d4e9092097e437ab61c9916 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 20:45:38 +0800 Subject: [PATCH 204/263] up --- scripts/install/freebsd.sh | 8 +++++--- scripts/update/freebsd.sh | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index 9daa4f0da..a20a883b4 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -18,6 +18,8 @@ pkg install -y make cmake pkg install -y libxslt pkg install -y libunwind +pkg install -y mysql-devel + pkg autoremove -y @@ -88,7 +90,7 @@ do fi done -cd /www/server/mdserver-web && /etc/init.d/mw stop -cd /www/server/mdserver-web && /etc/init.d/mw start -cd /www/server/mdserver-web && /etc/init.d/mw default +cd /www/server/mdserver-web && bash /etc/init.d/mw stop +cd /www/server/mdserver-web && bash /etc/init.d/mw start +cd /www/server/mdserver-web && bash /etc/init.d/mw default diff --git a/scripts/update/freebsd.sh b/scripts/update/freebsd.sh index 568fdc106..5cb3733fe 100644 --- a/scripts/update/freebsd.sh +++ b/scripts/update/freebsd.sh @@ -71,7 +71,7 @@ do fi done -cd /www/server/mdserver-web && /etc/init.d/mw stop -cd /www/server/mdserver-web && /etc/init.d/mw start -cd /www/server/mdserver-web && /etc/init.d/mw default +cd /www/server/mdserver-web && bash /etc/init.d/mw stop +cd /www/server/mdserver-web && bash /etc/init.d/mw start +cd /www/server/mdserver-web && bash /etc/init.d/mw default From 58bdbc69fcedf61180dea2d692c53fa6b2bf0fbd Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 20:48:14 +0800 Subject: [PATCH 205/263] Update freebsd.sh --- scripts/install/freebsd.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index a20a883b4..dd14a0463 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -11,6 +11,7 @@ python3 -m pip install --upgrade pip pkg install -y lsof pkg install -y sqlite3 pkg install -y py38-sqlite3 +pkg install -y py38-mysqlclient pkg install -y gcc pkg install -y autoconf From c649330d95dde1039191deea1efef535c4de8d9e Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 20:56:59 +0800 Subject: [PATCH 206/263] up --- class/core/system_api.py | 2 +- scripts/install/freebsd.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/class/core/system_api.py b/class/core/system_api.py index a45877909..dc9ea6a4e 100755 --- a/class/core/system_api.py +++ b/class/core/system_api.py @@ -351,7 +351,7 @@ class system_api: diskInfo = [] n = 0 cuts = ['/mnt/cdrom', '/boot', '/boot/efi', '/dev', - '/dev/shm', '/run/lock', '/run', '/run/shm', '/run/user'] + '/dev/shm', '/zroot', '/run/lock', '/run', '/run/shm', '/run/user'] for tmp in temp1: n += 1 inodes = tempInodes1[n - 1].split() diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index dd14a0463..4dda20fe0 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -15,7 +15,7 @@ pkg install -y py38-mysqlclient pkg install -y gcc pkg install -y autoconf -pkg install -y make cmake +pkg install -y make cmake gmake pkg install -y libxslt pkg install -y libunwind From f145b744e53137ebc8938b5638b2ce6306021a29 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 21:11:22 +0800 Subject: [PATCH 207/263] up --- scripts/install.sh | 15 ++++++++++----- scripts/install/freebsd.sh | 7 ++++++- scripts/install_cn.sh | 15 ++++++++++----- scripts/install_dev.sh | 15 ++++++++++----- scripts/lib.sh | 10 +++++++++- scripts/update.sh | 15 ++++++++++----- scripts/update_cn.sh | 15 ++++++++++----- scripts/update_dev.sh | 15 ++++++++++----- 8 files changed, 75 insertions(+), 32 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index c90e56a46..b81f727c7 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -18,15 +18,20 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release; then - ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ];; then + sudo ln -sf /bin/bash /bin/sh + #sudo dpkg-reconfigure dash fi -if grep -Eq "Debian" /etc/*-release; then - ln -sf /bin/bash /bin/sh +if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then + ln -sf /bin/bash /bin/sh fi +if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then + ln -sf /usr/local/bin/bash /bin/bash +fi + + if [ ${_os} == "Darwin" ]; then OSNAME='macos' diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index 4dda20fe0..8ee2e9c3a 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -15,10 +15,15 @@ pkg install -y py38-mysqlclient pkg install -y gcc pkg install -y autoconf -pkg install -y make cmake gmake +pkg install -y make +pkg install -y gmake +pkg install -y cmake pkg install -y libxslt pkg install -y libunwind +pkg install -y pcre +pkg install -y webp + pkg install -y mysql-devel diff --git a/scripts/install_cn.sh b/scripts/install_cn.sh index 9f5e43c26..179578c69 100755 --- a/scripts/install_cn.sh +++ b/scripts/install_cn.sh @@ -18,15 +18,20 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release; then - ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ];; then + sudo ln -sf /bin/bash /bin/sh + #sudo dpkg-reconfigure dash fi -if grep -Eq "Debian" /etc/*-release; then - ln -sf /bin/bash /bin/sh +if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then + ln -sf /bin/bash /bin/sh fi +if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then + ln -sf /usr/local/bin/bash /bin/bash +fi + + if [ ${_os} == "Darwin" ]; then OSNAME='macos' diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 03c20fdcc..bada653a4 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -18,15 +18,20 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release; then - ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ];; then + sudo ln -sf /bin/bash /bin/sh + #sudo dpkg-reconfigure dash fi -if grep -Eq "Debian" /etc/*-release; then - ln -sf /bin/bash /bin/sh +if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then + ln -sf /bin/bash /bin/sh fi +if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then + ln -sf /usr/local/bin/bash /bin/bash +fi + + if [ ${_os} == "Darwin" ]; then OSNAME='macos' diff --git a/scripts/lib.sh b/scripts/lib.sh index 4ee55fda3..d3fa6f67d 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -222,11 +222,19 @@ echo -e "Install_Curl" >> ${libPath}/lib.pl } -if grep -Eq "Ubuntu" /etc/*-release; then +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ];; then sudo ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi +if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then + ln -sf /bin/bash /bin/sh +fi + +if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then + ln -sf /usr/local/bin/bash /bin/bash +fi + _os=`uname` if [ ${_os} == "Darwin" ]; then OSNAME='macos' diff --git a/scripts/update.sh b/scripts/update.sh index d66942575..df4f2ddfc 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -14,15 +14,20 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release; then - ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ];; then + sudo ln -sf /bin/bash /bin/sh + #sudo dpkg-reconfigure dash fi -if grep -Eq "Debian" /etc/*-release; then - ln -sf /bin/bash /bin/sh +if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then + ln -sf /bin/bash /bin/sh fi +if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then + ln -sf /usr/local/bin/bash /bin/bash +fi + + if [ ${_os} == "Darwin" ]; then OSNAME='macos' elif grep -Eq "openSUSE" /etc/*-release; then diff --git a/scripts/update_cn.sh b/scripts/update_cn.sh index a76824af6..058cccd63 100755 --- a/scripts/update_cn.sh +++ b/scripts/update_cn.sh @@ -14,15 +14,20 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release; then - ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ];; then + sudo ln -sf /bin/bash /bin/sh + #sudo dpkg-reconfigure dash fi -if grep -Eq "Debian" /etc/*-release; then - ln -sf /bin/bash /bin/sh +if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then + ln -sf /bin/bash /bin/sh fi +if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then + ln -sf /usr/local/bin/bash /bin/bash +fi + + if [ ${_os} == "Darwin" ]; then OSNAME='macos' elif grep -Eq "openSUSE" /etc/*-release; then diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index 45f3de803..94e8094a5 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -14,15 +14,20 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release; then - ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ];; then + sudo ln -sf /bin/bash /bin/sh + #sudo dpkg-reconfigure dash fi -if grep -Eq "Debian" /etc/*-release; then - ln -sf /bin/bash /bin/sh +if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then + ln -sf /bin/bash /bin/sh fi +if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then + ln -sf /usr/local/bin/bash /bin/bash +fi + + if [ ${_os} == "Darwin" ]; then OSNAME='macos' elif grep -Eq "openSUSE" /etc/*-release; then From 95e830c8556086ff04b813cb459a207646eab21c Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 22:21:27 +0800 Subject: [PATCH 208/263] up --- plugins/openresty/install.sh | 2 ++ scripts/install/freebsd.sh | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index f4225a1a3..0de30bfa9 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -40,6 +40,8 @@ Install_openresty() # --with-openssl=$serverPath/source/lib/openssl-1.0.2q cd ${openrestyDir}/openresty-${VERSION} && ./configure \ --prefix=$serverPath/openresty \ + --with-pcre-jit \ + --with-ipv6 \ --with-http_v2_module \ --with-http_ssl_module \ --with-http_slice_module \ diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index 8ee2e9c3a..544b30903 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -20,9 +20,14 @@ pkg install -y gmake pkg install -y cmake pkg install -y libxslt pkg install -y libunwind +pkg install -y influxpkg-config pkg install -y pcre pkg install -y webp +pkg install -y freetype +pkg install -y oniguruma +pkg install -y brotli +pkg install -y harfbuzz pkg install -y mysql-devel From 130cdd15a252147e58937676efceae8c64a5884c Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 22:49:04 +0800 Subject: [PATCH 209/263] up --- scripts/install.sh | 6 +----- scripts/install/freebsd.sh | 4 ++++ scripts/install_cn.sh | 6 +----- scripts/install_dev.sh | 5 +---- scripts/update.sh | 6 +----- scripts/update_cn.sh | 5 +---- scripts/update_dev.sh | 6 +----- 7 files changed, 10 insertions(+), 28 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index b81f727c7..2a0a751a6 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -18,7 +18,7 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ];; then +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then sudo ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi @@ -27,10 +27,6 @@ if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then ln -sf /bin/bash /bin/sh fi -if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then - ln -sf /usr/local/bin/bash /bin/bash -fi - if [ ${_os} == "Darwin" ]; then diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index 544b30903..175c81a31 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -3,6 +3,10 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH LANG=en_US.UTF-8 +if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then + ln -sf /usr/local/bin/bash /bin/bash +fi + pkg update -y pkg install -y python3 python3 -m ensurepip diff --git a/scripts/install_cn.sh b/scripts/install_cn.sh index 179578c69..d33c3784f 100755 --- a/scripts/install_cn.sh +++ b/scripts/install_cn.sh @@ -18,7 +18,7 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ];; then +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then sudo ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi @@ -27,10 +27,6 @@ if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then ln -sf /bin/bash /bin/sh fi -if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then - ln -sf /usr/local/bin/bash /bin/bash -fi - if [ ${_os} == "Darwin" ]; then diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index bada653a4..55b90b224 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -18,7 +18,7 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ];; then +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then sudo ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi @@ -27,9 +27,6 @@ if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then ln -sf /bin/bash /bin/sh fi -if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then - ln -sf /usr/local/bin/bash /bin/bash -fi diff --git a/scripts/update.sh b/scripts/update.sh index df4f2ddfc..dcf865fba 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -14,7 +14,7 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ];; then +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then sudo ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi @@ -23,10 +23,6 @@ if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then ln -sf /bin/bash /bin/sh fi -if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then - ln -sf /usr/local/bin/bash /bin/bash -fi - if [ ${_os} == "Darwin" ]; then OSNAME='macos' diff --git a/scripts/update_cn.sh b/scripts/update_cn.sh index 058cccd63..9924e2a97 100755 --- a/scripts/update_cn.sh +++ b/scripts/update_cn.sh @@ -14,7 +14,7 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ];; then +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then sudo ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi @@ -23,9 +23,6 @@ if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then ln -sf /bin/bash /bin/sh fi -if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then - ln -sf /usr/local/bin/bash /bin/bash -fi if [ ${_os} == "Darwin" ]; then diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index 94e8094a5..bcc83ca9e 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -14,7 +14,7 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ];; then +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then sudo ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi @@ -23,10 +23,6 @@ if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then ln -sf /bin/bash /bin/sh fi -if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then - ln -sf /usr/local/bin/bash /bin/bash -fi - if [ ${_os} == "Darwin" ]; then OSNAME='macos' From 353e4d572ab52f1322772e1326da1f562c99a1f5 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 22:58:41 +0800 Subject: [PATCH 210/263] Update install.sh --- plugins/openresty/install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index 0de30bfa9..f4225a1a3 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -40,8 +40,6 @@ Install_openresty() # --with-openssl=$serverPath/source/lib/openssl-1.0.2q cd ${openrestyDir}/openresty-${VERSION} && ./configure \ --prefix=$serverPath/openresty \ - --with-pcre-jit \ - --with-ipv6 \ --with-http_v2_module \ --with-http_ssl_module \ --with-http_slice_module \ From 2738358042ab9b0c54b6d42c59a3c7932e176c2a Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 23:06:50 +0800 Subject: [PATCH 211/263] Update mw.tpl --- scripts/init.d/mw.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index d105ba1b7..6efd2af6a 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -92,7 +92,7 @@ mw_stop_task() { if [ -f $mw_path/tmp/panelTask.pl ];then echo -e "\033[32mThe task is running and cannot be stopped\033[0m" - return + exit 0 fi echo -e "Stopping mw-tasks... \c"; From a4e4219880c54a080ce76a6926ebae53bb6020c5 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 23:10:09 +0800 Subject: [PATCH 212/263] Update lib.sh --- scripts/lib.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/lib.sh b/scripts/lib.sh index d3fa6f67d..5763c5b7b 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -222,7 +222,7 @@ echo -e "Install_Curl" >> ${libPath}/lib.pl } -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ];; then +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then sudo ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi @@ -231,10 +231,6 @@ if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then ln -sf /bin/bash /bin/sh fi -if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then - ln -sf /usr/local/bin/bash /bin/bash -fi - _os=`uname` if [ ${_os} == "Darwin" ]; then OSNAME='macos' From f911f7ec1c6834bec45340284c029bf8a3c5d79e Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 23:11:04 +0800 Subject: [PATCH 213/263] up --- scripts/install/debian.sh | 4 ++++ scripts/install/ubuntu.sh | 5 +++++ scripts/lib.sh | 8 -------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index ea3761dd6..aa9449b76 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -12,6 +12,10 @@ LANG=en_US.UTF-8 # WHITE='\e[1;37m' # 白色 # NC='\e[0m' # 没有颜色 +if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then + ln -sf /bin/bash /bin/sh +fi + apt update -y diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 6d4a66c2e..7b07815e1 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -3,6 +3,11 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH LANG=en_US.UTF-8 +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then + sudo ln -sf /bin/bash /bin/sh + #sudo dpkg-reconfigure dash +fi + apt update -y diff --git a/scripts/lib.sh b/scripts/lib.sh index 5763c5b7b..b4806b295 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -222,14 +222,6 @@ echo -e "Install_Curl" >> ${libPath}/lib.pl } -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then - sudo ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash -fi - -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then - ln -sf /bin/bash /bin/sh -fi _os=`uname` if [ ${_os} == "Darwin" ]; then From d6ce53d48e558992bb8ddb44030f45ac301ec868 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 23:22:31 +0800 Subject: [PATCH 214/263] Update mw.tpl --- scripts/init.d/mw.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index 6efd2af6a..b5273d7be 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -83,8 +83,8 @@ mw_start_task() mw_start() { - mw_start_panel mw_start_task + mw_start_panel } @@ -123,8 +123,8 @@ mw_stop_panel() mw_stop() { - mw_stop_panel mw_stop_task + mw_stop_panel } mw_status() From e25ad78bb0bd7e25743d7b67977aa35f326e6c3a Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 23:24:12 +0800 Subject: [PATCH 215/263] Update freebsd.sh --- scripts/update/freebsd.sh | 53 +++------------------------------------ 1 file changed, 4 insertions(+), 49 deletions(-) diff --git a/scripts/update/freebsd.sh b/scripts/update/freebsd.sh index 5cb3733fe..a6e47c77d 100644 --- a/scripts/update/freebsd.sh +++ b/scripts/update/freebsd.sh @@ -4,58 +4,13 @@ export PATH LANG=en_US.UTF-8 -#https need -if [ ! -d /root/.acme.sh ];then - curl https://get.acme.sh | sh -fi - -if [ -f /etc/init.d/iptables ];then - - iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT - iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT - iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT - iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT - iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT - # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT - # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT - service iptables save - - iptables_status=`service iptables status | grep 'not running'` - if [ "${iptables_status}" == '' ];then - service iptables restart - fi - - #安装时不开启 - service iptables stop -fi - - -if [ ! -f /etc/init.d/iptables ];then - pkg install -y firewalld - systemctl enable firewalld - systemctl start firewalld - - firewall-cmd --permanent --zone=public --add-port=22/tcp - firewall-cmd --permanent --zone=public --add-port=80/tcp - firewall-cmd --permanent --zone=public --add-port=443/tcp - firewall-cmd --permanent --zone=public --add-port=888/tcp - firewall-cmd --permanent --zone=public --add-port=7200/tcp - # firewall-cmd --permanent --zone=public --add-port=3306/tcp - # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp - - - sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf - firewall-cmd --reload - #安装时不开启 - systemctl stop firewalld -fi - - - - cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data +if [ -f /etc/init.d/mw ];then + sh /etc/init.d/mw stop && rm -rf /www/server/mdserver-web/scripts/init.d/mw && rm -rf /etc/init.d/mw +fi + cd /www/server/mdserver-web && bash cli.sh start isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` From 79f6323e7ef9491761e6cefeb891dd0697d9118b Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 23:29:32 +0800 Subject: [PATCH 216/263] Update freebsd.sh --- scripts/install/freebsd.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install/freebsd.sh b/scripts/install/freebsd.sh index 175c81a31..5a6f9fed3 100644 --- a/scripts/install/freebsd.sh +++ b/scripts/install/freebsd.sh @@ -16,6 +16,7 @@ pkg install -y lsof pkg install -y sqlite3 pkg install -y py38-sqlite3 pkg install -y py38-mysqlclient +pkg install -y py38-cffi pkg install -y gcc pkg install -y autoconf @@ -33,7 +34,7 @@ pkg install -y oniguruma pkg install -y brotli pkg install -y harfbuzz -pkg install -y mysql-devel +# pkg install -y py38-cffi pkg autoremove -y From 8658913321a1cb71e6217bcc4102998875a935c8 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 23:31:32 +0800 Subject: [PATCH 217/263] Update mw.tpl --- scripts/init.d/mw.tpl | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index b5273d7be..d9979601c 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -98,7 +98,6 @@ mw_stop_task() echo -e "Stopping mw-tasks... \c"; pids=$(ps aux | grep 'task.py'|grep -v grep|awk '{print $2}') arr=($pids) - for p in ${arr[@]} do kill -9 $p From 6a990b503093612bc59c1129dc1ee76508fca1f4 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 00:06:47 +0800 Subject: [PATCH 218/263] Update centos.sh --- scripts/install/centos.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index de18732a0..5e604ba09 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -14,6 +14,7 @@ sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config yum install -y wget lsof crontabs yum install -y python3-devel +yum install -y python3-pip yum install -y python-devel yum install -y vixie-cron yum install -y curl-devel libmcrypt libmcrypt-devel @@ -48,6 +49,8 @@ fi if [ ! -f /etc/init.d/iptables ];then yum install firewalld -y systemctl enable firewalld + #取消服务锁定 + systemctl unmask firewalld systemctl start firewalld firewall-cmd --permanent --zone=public --add-port=22/tcp From 87a8e4a0ce2a9402fcfa8aaaf66141aca2ac1f05 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 00:43:46 +0800 Subject: [PATCH 219/263] up --- scripts/install.sh | 10 ---------- scripts/install/centos.sh | 6 ++---- scripts/install/debian.sh | 2 +- scripts/install/ubuntu.sh | 2 +- scripts/install_cn.sh | 9 --------- scripts/install_dev.sh | 10 ---------- scripts/update.sh | 9 --------- scripts/update/debian.sh | 5 +++++ scripts/update/ubuntu.sh | 4 ++++ scripts/update_cn.sh | 9 --------- scripts/update_dev.sh | 9 --------- 11 files changed, 13 insertions(+), 62 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 2a0a751a6..91e78049e 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -18,16 +18,6 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then - sudo ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash -fi - -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then - ln -sf /bin/bash /bin/sh -fi - - if [ ${_os} == "Darwin" ]; then OSNAME='macos' diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 5e604ba09..b681f9626 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -64,12 +64,10 @@ if [ ! -f /etc/init.d/iptables ];then sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf firewall-cmd --reload + #安装时不开启 + systemctl stop firewalld fi - -#安装时不开启 -systemctl stop firewalld - yum groupinstall -y "Development Tools" yum install -y epel-release diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index aa9449b76..3d36c4ef6 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -12,7 +12,7 @@ LANG=en_US.UTF-8 # WHITE='\e[1;37m' # 白色 # NC='\e[0m' # 没有颜色 -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then +if grep -Eq "Debian" /etc/*-release; then ln -sf /bin/bash /bin/sh fi diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 7b07815e1..ff360fc06 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -3,7 +3,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH LANG=en_US.UTF-8 -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then +if grep -Eq "Ubuntu" /etc/*-release; then sudo ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi diff --git a/scripts/install_cn.sh b/scripts/install_cn.sh index d33c3784f..f6d1fd9d4 100755 --- a/scripts/install_cn.sh +++ b/scripts/install_cn.sh @@ -18,15 +18,6 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then - sudo ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash -fi - -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then - ln -sf /bin/bash /bin/sh -fi - if [ ${_os} == "Darwin" ]; then diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 55b90b224..66ea885cd 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -18,16 +18,6 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then - sudo ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash -fi - -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then - ln -sf /bin/bash /bin/sh -fi - - if [ ${_os} == "Darwin" ]; then diff --git a/scripts/update.sh b/scripts/update.sh index dcf865fba..dd13727bb 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -14,15 +14,6 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then - sudo ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash -fi - -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then - ln -sf /bin/bash /bin/sh -fi - if [ ${_os} == "Darwin" ]; then OSNAME='macos' diff --git a/scripts/update/debian.sh b/scripts/update/debian.sh index f82fc8db5..a5a13992a 100644 --- a/scripts/update/debian.sh +++ b/scripts/update/debian.sh @@ -3,6 +3,11 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH LANG=en_US.UTF-8 +if grep -Eq "Ubuntu" /etc/*-release; then + sudo ln -sf /bin/bash /bin/sh + #sudo dpkg-reconfigure dash +fi + cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data diff --git a/scripts/update/ubuntu.sh b/scripts/update/ubuntu.sh index f53954315..827009782 100644 --- a/scripts/update/ubuntu.sh +++ b/scripts/update/ubuntu.sh @@ -3,6 +3,10 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH LANG=en_US.UTF-8 +if grep -Eq "Ubuntu" /etc/*-release; then + sudo ln -sf /bin/bash /bin/sh + #sudo dpkg-reconfigure dash +fi cd /www/server/mdserver-web/scripts && bash lib.sh diff --git a/scripts/update_cn.sh b/scripts/update_cn.sh index 9924e2a97..f7392d136 100755 --- a/scripts/update_cn.sh +++ b/scripts/update_cn.sh @@ -14,15 +14,6 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then - sudo ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash -fi - -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then - ln -sf /bin/bash /bin/sh -fi - if [ ${_os} == "Darwin" ]; then diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index bcc83ca9e..fd9d14b94 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -14,15 +14,6 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then - sudo ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash -fi - -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then - ln -sf /bin/bash /bin/sh -fi - if [ ${_os} == "Darwin" ]; then OSNAME='macos' From 5f3a8bbdcac31eb7a6e8edc650292172e81113c1 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 09:04:14 +0800 Subject: [PATCH 220/263] up --- plugins/openresty/install.sh | 2 +- plugins/php/index.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index f4225a1a3..a769b4a3b 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -51,7 +51,7 @@ Install_openresty() echo "${VERSION}" > $serverPath/openresty/version.pl mkdir -p $serverPath/web_conf/php/conf - echo "" > $serverPath/web_conf/php/conf/enable-php-00.conf + echo 'set $PHP_ENV 0;' > $serverPath/web_conf/php/conf/enable-php-00.conf #初始化 cd ${rootPath} && python3 ${rootPath}/plugins/openresty/index.py start diff --git a/plugins/php/index.py b/plugins/php/index.py index 9c09647db..32e2fa25e 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -152,7 +152,7 @@ def makeOpenrestyConf(): dfile = sdir + '/web_conf/php/conf/enable-php-' + x + '.conf' if not os.path.exists(dfile): if x == '00': - mw.writeFile(dfile, '') + mw.writeFile(dfile, 'set $PHP_ENV 0;') else: w_content = contentReplace(tpl_content, x) mw.writeFile(dfile, w_content) From 59769cd8d481dc8b9bed72fd6d5a2ca9eb0f8a48 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 09:26:52 +0800 Subject: [PATCH 221/263] Update index.py --- plugins/openresty/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index 28c818722..bc5f71de6 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -132,7 +132,7 @@ def confReplace(): mw.execShell('mkdir -p ' + php_conf) static_conf = mw.getServerDir() + '/web_conf/php/conf/enable-php-00.conf' if not os.path.exists(static_conf): - mw.writeFile(static_conf, '') + mw.writeFile(static_conf, 'set $PHP_ENV 0;') # give nginx root permission ng_exe_bin = getServerDir() + "/nginx/sbin/nginx" From 3b0a21020bb97f90e756907e867011da8d95e398 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 09:28:33 +0800 Subject: [PATCH 222/263] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 7800115ed..4df5d417c 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,6 @@ * phpMyAdmin - 著名Web端MySQL管理工具。 * Memcached - 一个高性能的分布式内存对象缓存系统。 * Redis - 一个高性能的KV数据库。 -* CSVN - 最流行的SVN代码共享管理软件。 * PureFtpd - 一款专注于程序健壮和软件安全的免费FTP服务器软件。 * Gogs - 一款极易搭建的自助Git服务。 * Rsyncd - 通用同步服务。 From 692da86677c88cf43a7dff86e51b95528b4526fe Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 09:56:36 +0800 Subject: [PATCH 223/263] Update index.py --- plugins/php/index.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index 32e2fa25e..3325ff409 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -556,8 +556,10 @@ def checkFpmStatusFile(version): def getFpmStatus(version): - checkFpmStatusFile(version) + if version == '52': + return mw.returnJson(False, 'PHP[' + version + ']不支持!!!') + checkFpmStatusFile(version) stat = status(version) if stat == 'stop': return mw.returnJson(False, 'PHP[' + version + ']未启动!!!') From 3c22d5dd6f0f85cb409d0afaaf904498a66bee34 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 10:16:55 +0800 Subject: [PATCH 224/263] mongodb centos add --- plugins/mongodb/install.sh | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh index 49878b4b3..c9ce4c34a 100755 --- a/plugins/mongodb/install.sh +++ b/plugins/mongodb/install.sh @@ -28,8 +28,6 @@ elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then OSNAME='debian' elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then OSNAME='ubuntu' -elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then - OSNAME='raspbian' else OSNAME='unknow' fi @@ -171,14 +169,27 @@ rm -r /var/lib/mongo Install_Linux_CentOS() { ##################### centos start ##################### - if [ ! -f $serverPath/source/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm ];then - wget -O $serverPath/source/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm https://repo.mongodb.org/yum/redhat/7/mongodb-org/5.0/x86_64/RPMS/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm - fi +echo " +[mongodb-org-${VERSION}] +name=MongoDB Repository +baseurl=https://repo.mongodb.org/yum/redhat/\$releasever/mongodb-org/${VERSION}/x86_64/ +gpgcheck=1 +enabled=1 +gpgkey=https://www.mongodb.org/static/pgp/server-${VERSION}.asc +" > /etc/yum.repos.d/mongodb-org-${VERSION}.rep - rpm -ivh $serverPath/source/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm +yum install -y mongodb-org ##################### centos end ##################### } +Uninstall_Linux_CentOS() +{ +systemctl stop mongod +yum erase -y $(rpm -qa | grep mongodb-org) +rm -r /var/log/mongodb +rm -r /var/lib/mongo +} + Install_app_linux() { @@ -225,9 +236,9 @@ Uninstall_app_linux() if [ "$OSNAME" == "ubuntu" ];then Uninstall_Linux_Ubuntu elif [ "$OSNAME" == "debian" ];then - Unstall_Linux_Debian + Uninstall_Linux_Debian elif [ "$OSNAME" == "centos" ];then - Install_Linux_CentOS + Uninstall_Linux_CentOS elif [ "$OSNAME" == "opensuse" ];then Uninstall_Linux_Opensuse else From 133d5e15d0340308b9b0c480170ae44d943e8f15 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 10:21:59 +0800 Subject: [PATCH 225/263] Update install.sh --- plugins/mongodb/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh index c9ce4c34a..b7a739995 100755 --- a/plugins/mongodb/install.sh +++ b/plugins/mongodb/install.sh @@ -176,7 +176,7 @@ baseurl=https://repo.mongodb.org/yum/redhat/\$releasever/mongodb-org/${VERSION}/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-${VERSION}.asc -" > /etc/yum.repos.d/mongodb-org-${VERSION}.rep +" > /etc/yum.repos.d/mongodb-org-${VERSION}.repo yum install -y mongodb-org ##################### centos end ##################### From 67b45c635b5be169ae745eedc042f18e6897b61b Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 10:28:32 +0800 Subject: [PATCH 226/263] Update install.sh --- plugins/mongodb/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh index b7a739995..03982a158 100755 --- a/plugins/mongodb/install.sh +++ b/plugins/mongodb/install.sh @@ -168,6 +168,8 @@ rm -r /var/lib/mongo # https://repo.mongodb.org/yum/redhat/7/mongodb-org/5.0/x86_64/RPMS/mongodb-org-server-5.0.4-1.el7.x86_64.rpm Install_Linux_CentOS() { +#清空mongo的repo源 +rm -rf /etc/yum.repos.d/mongodb-org-* ##################### centos start ##################### echo " [mongodb-org-${VERSION}] From 85bb1b83e0dc6a9f4b84281122494899d5810087 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 10:29:06 +0800 Subject: [PATCH 227/263] Update install.sh --- plugins/mongodb/install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh index 03982a158..f14261131 100755 --- a/plugins/mongodb/install.sh +++ b/plugins/mongodb/install.sh @@ -168,6 +168,10 @@ rm -r /var/lib/mongo # https://repo.mongodb.org/yum/redhat/7/mongodb-org/5.0/x86_64/RPMS/mongodb-org-server-5.0.4-1.el7.x86_64.rpm Install_Linux_CentOS() { +if [ -f /usr/lib/systemd/system/mongod.service ];then + echo 'alreay exist!' + exit 0 +fi #清空mongo的repo源 rm -rf /etc/yum.repos.d/mongodb-org-* ##################### centos start ##################### From 43e3ea75d3df167f59c43829e5a73b2deb033863 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 10:38:49 +0800 Subject: [PATCH 228/263] Update mw.tpl --- scripts/init.d/mw.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index d9979601c..699c362da 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -77,7 +77,7 @@ mw_start_task() fi echo -e "\033[32mdone\033[0m" else - echo "Starting mw-tasks... mw-tasks (pid $isStart) already running" + echo "Starting mw-tasks... mw-tasks (pid $(echo $isStart)) already running" fi } From 03c94313dd65a13a33a166ed0b201ecefb3e09bf Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 10:54:49 +0800 Subject: [PATCH 229/263] Update cli.sh --- cli.sh | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/cli.sh b/cli.sh index f38e77abb..2ca2de7d8 100755 --- a/cli.sh +++ b/cli.sh @@ -11,9 +11,33 @@ fi # export LC_ALL="en_US.UTF-8" + +mw_start_task() +{ + isStart=$(ps aux |grep 'task.py'|grep -v grep|awk '{print $2}') + if [ "$isStart" == '' ];then + echo -e "Starting mw-tasks... \c" + cd $DIR && python3 task.py >> ${DIR}/logs/task.log 2>&1 & + sleep 0.3 + isStart=$(ps aux |grep 'task.py'|grep -v grep|awk '{print $2}') + if [ "$isStart" == '' ];then + echo -e "\033[31mfailed\033[0m" + echo '------------------------------------------------------' + tail -n 20 $DIR/logs/task.log + echo '------------------------------------------------------' + echo -e "\033[31mError: mw-tasks service startup failed.\033[0m" + return; + fi + echo -e "\033[32mdone\033[0m" + else + echo "Starting mw-tasks... mw-tasks (pid $(echo $isStart)) already running" + fi +} + mw_start(){ gunicorn -c setting.py app:app - python3 task.py >> $DIR/logs/task.log 2>&1 & + #安全启动 + mw_start_task } From 7836ae99cb33b4cb6e583aafca20d38a768ad4fe Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 10:58:47 +0800 Subject: [PATCH 230/263] Update config_api.py --- class/core/config_api.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/class/core/config_api.py b/class/core/config_api.py index 8a76e50d1..3f676819a 100755 --- a/class/core/config_api.py +++ b/class/core/config_api.py @@ -15,9 +15,8 @@ from flask import request class config_api: - # 本版解决自启动问题 - # 文件管理重命名 - # 优化计划任务管理 + # 进行中. + # 兼容主流Linux系统 __version = '0.8.6.3' def __init__(self): From b07a1c9baca8b6cf74cbf6c3351ed3eb9ca02f4f Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 11:09:00 +0800 Subject: [PATCH 231/263] Update page.py --- class/core/page.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/class/core/page.py b/class/core/page.py index a504494a6..b43ae7a18 100755 --- a/class/core/page.py +++ b/class/core/page.py @@ -2,7 +2,6 @@ import math import string -import mw class Page(): @@ -29,7 +28,6 @@ class Page(): __END_NUM = None # 结束行 def __init__(self): - # tmp = mw.getMsg('PAGE') if False: self.__PREV = tmp['PREV'] self.__NEXT = tmp['NEXT'] From c24e0604acc6ad31f765c7695420ab9f3bd9e365 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 11:34:14 +0800 Subject: [PATCH 232/263] =?UTF-8?q?=E6=94=B9=E4=B8=BA=E7=BB=9D=E5=AF=B9?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/plugins_api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/class/core/plugins_api.py b/class/core/plugins_api.py index 77ac43824..6064c437d 100755 --- a/class/core/plugins_api.py +++ b/class/core/plugins_api.py @@ -43,6 +43,9 @@ class plugins_api: def __init__(self): self.setupPath = 'server' + self.__plugin_dir = mw.getRunDir() + '/plugins' + self.__type = mw.getRunDir() + 'data/json/type.json' + self.__index = mw.getRunDir() + 'data/json/index.json' ##### ----- start ----- ### def listApi(self): From 3eb8ee53c88463404508897bfd303c965dae608f Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 11:34:27 +0800 Subject: [PATCH 233/263] Update plugins_api.py --- class/core/plugins_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class/core/plugins_api.py b/class/core/plugins_api.py index 6064c437d..4be268ea0 100755 --- a/class/core/plugins_api.py +++ b/class/core/plugins_api.py @@ -44,8 +44,8 @@ class plugins_api: def __init__(self): self.setupPath = 'server' self.__plugin_dir = mw.getRunDir() + '/plugins' - self.__type = mw.getRunDir() + 'data/json/type.json' - self.__index = mw.getRunDir() + 'data/json/index.json' + self.__type = mw.getRunDir() + '/data/json/type.json' + self.__index = mw.getRunDir() + '/data/json/index.json' ##### ----- start ----- ### def listApi(self): From 7565fcc099e27b6c1126ac9a52e67cc29a6fa864 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 11:39:46 +0800 Subject: [PATCH 234/263] Update __init__.py --- route/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/route/__init__.py b/route/__init__.py index d1e3863a6..4df89dee4 100755 --- a/route/__init__.py +++ b/route/__init__.py @@ -6,6 +6,7 @@ import os import time import shutil import uuid +import traceback # reload(sys) # sys.setdefaultencoding('utf-8') @@ -127,6 +128,8 @@ def publicObject(toObject, func, action=None, get=None): data = {'msg': '404,not find api[' + name + ']', "status": False} return mw.getJson(data) except Exception as e: + # API发生错误记录 + print(traceback.print_exc()) data = {'msg': '访问异常:' + str(e) + '!', "status": False} return mw.getJson(data) From 9a802a957e4aeb36bc413d499e6a3041393768e7 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 11:46:49 +0800 Subject: [PATCH 235/263] Update mw.tpl --- scripts/init.d/mw.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index 699c362da..f34cfc9b3 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -14,7 +14,7 @@ PATH=/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -# export LC_ALL="en_US.UTF-8" +export LC_ALL="en_US.UTF-8" mw_path={$SERVER_PATH} PATH=$PATH:$mw_path/bin From f78a4d26c7d1f188bd57b5b925fd058bd03f2981 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 12:09:40 +0800 Subject: [PATCH 236/263] 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 4be268ea0..54d954524 100755 --- a/class/core/plugins_api.py +++ b/class/core/plugins_api.py @@ -798,7 +798,7 @@ class plugins_api: # shell 调用 def run(self, name, func, version='', args='', script='index'): - path = mw.getRunDir() + '/' + self.__plugin_dir + \ + path = self.__plugin_dir + \ '/' + name + '/' + script + '.py' py = 'python3 ' + path From 3784c95cb6077da9e1ecf7e67c096fa45e28c1a5 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 12:10:10 +0800 Subject: [PATCH 237/263] 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 54d954524..3b1e26cc0 100755 --- a/class/core/plugins_api.py +++ b/class/core/plugins_api.py @@ -820,7 +820,7 @@ class plugins_api: # 映射包调用 def callback(self, name, func, args='', script='index'): - package = mw.getRunDir() + '/plugins/' + name + package = self.__plugin_dir + '/' + name if not os.path.exists(package): return (False, "插件不存在!") From f31eb40c2def060c33fe27987fa30d032064c373 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 12:21:07 +0800 Subject: [PATCH 238/263] Update index.py --- plugins/pureftp/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/pureftp/index.py b/plugins/pureftp/index.py index 1d729c31f..e82704bd6 100755 --- a/plugins/pureftp/index.py +++ b/plugins/pureftp/index.py @@ -177,7 +177,7 @@ def initdInstall(): if mw.isAppleSystem(): return "Apple Computer does not support" - mw.execShell('systemctl start pureftp') + mw.execShell('systemctl enable pureftp') return 'ok' @@ -185,7 +185,7 @@ def initdUinstall(): if mw.isAppleSystem(): return "Apple Computer does not support" - mw.execShell('systemctl stop pureftp') + mw.execShell('systemctl disable pureftp') return 'ok' From 76f591bbf96273433b43b412e1aea3b3d6fd8fde Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 12:32:21 +0800 Subject: [PATCH 239/263] Update compatibility.md --- compatibility.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compatibility.md b/compatibility.md index 7bc30aa5a..495256965 100644 --- a/compatibility.md +++ b/compatibility.md @@ -3,6 +3,14 @@ - 暂时不具有指导意见 +快速测试命令 + +``` +cd /www/server/mdserver-web/scripts/quick && bash debug.sh +cd /www/server/mdserver-web/plugins/php && bash all_test.sh +``` + + | 系统名称 | 面板 | OpenResty | | ----------------- |---------------|---------------| | CentOS 7.9 |✅ |✅ | From 2493776f9f7c5945f06dbd32579b027860fb8ff5 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 12:43:46 +0800 Subject: [PATCH 240/263] =?UTF-8?q?php=E5=8D=B8=E8=BD=BD=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=A4=8D=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index 3325ff409..47770eb23 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -707,7 +707,8 @@ def uninstallLib(version): name + '.sh' + ' uninstall ' + version data = mw.execShell(execstr) - if data[0] == '' and data[1] == '': + # data[0] == '' and + if data[1] == '': return mw.returnJson(True, '已经卸载成功!') else: return mw.returnJson(False, '卸载信息![通道0]:' + data[0] + "[通道0]:" + data[1]) From 1e1f3f0b94e85d7e5e192362e79fec7090e8ce28 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 12:50:30 +0800 Subject: [PATCH 241/263] =?UTF-8?q?ioncube=E8=A6=81=E5=9C=A8ZendGuardLoade?= =?UTF-8?q?r=E8=8E=B7=E5=8F=96opcache=E5=89=8D=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/js/php.js | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/php/js/php.js b/plugins/php/js/php.js index 692cbdabe..ac79be02e 100755 --- a/plugins/php/js/php.js +++ b/plugins/php/js/php.js @@ -501,6 +501,7 @@ function phpLibConfig(version){
  • 请按实际需求安装扩展,不要安装不必要的PHP扩展,这会影响PHP执行效率,甚至出现异常
  • \
  • Redis扩展只允许在1个PHP版本中使用,安装到其它PHP版本请在[软件管理]重装Redis
  • \
  • opcache/xcache/apc等脚本缓存扩展,请只安装其中1个,否则可能导致您的站点程序异常
  • \ +
  • ioncube要在ZendGuardLoader获取opcache前安装,否则可能导致您的站点程序异常
  • \ '; $('.soft-man-con').html(con); }); From 7eb8dce4c98a693857760442a5c627c1119e1a98 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 12:50:46 +0800 Subject: [PATCH 242/263] Update php.js --- plugins/php/js/php.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/php/js/php.js b/plugins/php/js/php.js index ac79be02e..e3a109b42 100755 --- a/plugins/php/js/php.js +++ b/plugins/php/js/php.js @@ -501,7 +501,7 @@ function phpLibConfig(version){
  • 请按实际需求安装扩展,不要安装不必要的PHP扩展,这会影响PHP执行效率,甚至出现异常
  • \
  • Redis扩展只允许在1个PHP版本中使用,安装到其它PHP版本请在[软件管理]重装Redis
  • \
  • opcache/xcache/apc等脚本缓存扩展,请只安装其中1个,否则可能导致您的站点程序异常
  • \ -
  • ioncube要在ZendGuardLoader获取opcache前安装,否则可能导致您的站点程序异常
  • \ +
  • ioncube要在ZendGuardLoader/opcache前安装,否则可能导致您的站点程序异常
  • \ '; $('.soft-man-con').html(con); }); From a911e1f0aea49668ced78e0cca82af835b1fdb90 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 13:13:55 +0800 Subject: [PATCH 243/263] Update site.js --- route/static/app/site.js | 64 +++++++++++++--------------------------- 1 file changed, 20 insertions(+), 44 deletions(-) diff --git a/route/static/app/site.js b/route/static/app/site.js index f3aac26de..71ba77390 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -1626,6 +1626,7 @@ function toProxy(siteName, type, obj) { closeBtn: 2, shift: 5, shadeClose: false, + btn: ['提交','关闭'], content: "
    " + "
    "+ "目标URL" + @@ -1641,57 +1642,34 @@ function toProxy(siteName, type, obj) { "" + "
    " + "" + - "
    " + - "
    " - }); - setTimeout(function() { - $('.btn-colse-proxy').click(function() { - layer.close(proxy_form); - }); - $('.btn-submit-proxy').click(function() { + "", + yes:function(){ + var to = $('[name="to"]').val(); var from = $('[name="from"]').val(); var host = $('[name="host"]').val(); - - $.post('/site/set_proxy', { - siteName: siteName, - from: from, - to: to, - host: host, - }, function(res) { - res = JSON.parse(res); + $.post('/site/set_proxy', {siteName: siteName,from: from,to: to,host: host}, function(res) { if (res.status) { layer.close(proxy_form); toProxy(siteName) } else { - layer.msg(res.msg, { - icon: 2 - }); + layer.msg(res.msg, {icon: 2}); } - }); - }); - }, 100); + },'json'); + + } + }); } if (type == 2) { - $.post('/site/del_proxy', { - siteName: siteName, - id: obj, - }, function(res) { - res = JSON.parse(res); + $.post('/site/del_proxy', {siteName: siteName,id: obj,}, function(res) { if (res.status == true) { - layer.msg('删除成功', { - time: 1000, - icon: 1 - }); + layer.msg('删除成功', {time: 1000,icon: 1}); toProxy(siteName) } else { - layer.msg(res.msg, { - time: 1000, - icon: 2 - }); + layer.msg(res.msg, {time: 1000,icon: 2}); } - }); + },'json'); return } @@ -1704,7 +1682,7 @@ function toProxy(siteName, type, obj) { res = JSON.parse(res); if (res.status == true) { var mBody = "
    \ - \ + \
    \
      \
    • 此处为反向代理配置文件,若您不了解配置规则,请勿随意修改.
    • \ @@ -1721,7 +1699,7 @@ function toProxy(siteName, type, obj) { btn: ['提交','关闭'], content: mBody, success: function () { - editor = CodeMirror.fromTextArea(document.getElementById("configRedirectBody"), { + editor = CodeMirror.fromTextArea(document.getElementById("configProxyBody"), { extraKeys: {"Ctrl-Space": "autocomplete"}, lineNumbers: true, matchBrackets:true, @@ -1731,7 +1709,7 @@ function toProxy(siteName, type, obj) { $("#onlineEditFileBtn").unbind('click'); }, yes:function(index,layero){ - $("#configRedirectBody").empty().text(editor.getValue()); + $("#configProxyBody").empty().text(editor.getValue()); var load = layer.load(); var data = { siteName: siteName, @@ -1780,12 +1758,9 @@ function toProxy(siteName, type, obj) { $("#webedit-con").html(body); var loadT = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']}); - $.post("/site/get_proxy_list", { - siteName: siteName - },function (response) { + $.post("/site/get_proxy_list", {siteName: siteName},function (res) { layer.close(loadT); $("#md-301-loading").remove(); - let res = JSON.parse(response); if (res.status === true) { let data = res.data.result; data.forEach(function(item){ @@ -1802,7 +1777,8 @@ function toProxy(siteName, type, obj) { } else { layer.msg(res.msg, {icon:2}); } -}) + },'json'); +///////// } //文件验证 From e110d4f1b3ce626db9074d09fc2e32e0b0fa7834 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 14:09:46 +0800 Subject: [PATCH 244/263] Update install.sh --- plugins/mysql/versions/8.0/install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index 68a0537e9..8942c99bd 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -32,11 +32,11 @@ Install_mysql() fi INSTALL_CMD=cmake - if [ "$sysName" != "Darwin" ];then - mkdir -p /var/log/mariadb - touch /var/log/mariadb/mariadb.log - INSTALL_CMD=cmake - fi + # check cmake version + CMAKE_VERSION=`cmake -version | grep version | awk '{print $3}' | awk -F '.' '{print $1}'` + if [ "$CMAKE_VERSION" -eq "2" ];then + INSTALL_CMD=cmake3 + fi if [ ! -f ${mysqlDir}/mysql-boost-8.0.25.tar.gz ];then wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz From 95a439775223507201784991b005e2cc8b0f2438 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 14:10:08 +0800 Subject: [PATCH 245/263] Update install.sh --- plugins/mysql/versions/8.0/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index 8942c99bd..8e8bde45d 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -35,6 +35,8 @@ Install_mysql() # check cmake version CMAKE_VERSION=`cmake -version | grep version | awk '{print $3}' | awk -F '.' '{print $1}'` if [ "$CMAKE_VERSION" -eq "2" ];then + mkdir -p /var/log/mariadb + touch /var/log/mariadb/mariadb.log INSTALL_CMD=cmake3 fi From c69bcd5a5dd6bc8725d69d976a8436d10f9ed351 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 14:17:20 +0800 Subject: [PATCH 246/263] Update lib.sh --- scripts/lib.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/lib.sh b/scripts/lib.sh index b4806b295..9d9524d04 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -336,6 +336,7 @@ else yum install -y openldap openldap-devel libtirpc libtirpc-devel rpcgen yum install -y bison re2c cmake + yum install -y cmake3 yum install -y libmemcached libmemcached-devel yum install -y curl curl-devel From 8bc74963e0c1fd264ead55d1dcfe1f087c969c9c Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 14:29:43 +0800 Subject: [PATCH 247/263] Update compatibility.md --- compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compatibility.md b/compatibility.md index 495256965..346eab294 100644 --- a/compatibility.md +++ b/compatibility.md @@ -49,7 +49,7 @@ cd /www/server/mdserver-web/plugins/php && bash all_test.sh | 系统名称 | MySQL55 |MySQL56 |MySQL57 |MySQL80 | | ----------------- |-----------|-----------|-----------|-----------| -| CentOS 7.9 |✅ |✅ |✅ |✅ | +| CentOS 7.9 |✅ |✅ |✅ |:x: | | CentOS 8.4 |:x: |✅ |✅ |✅ | | CentOS 8 Stream |✅ |✅ |✅ |✅ | | CentOS 9 Stream |✅ |✅ |✅ |✅ | From 5ee5eb190fd329cd271d064bf4834acfaaf83266 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 14:38:10 +0800 Subject: [PATCH 248/263] mysql8 debug --- plugins/mysql/versions/8.0/install.sh | 63 ++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index 8e8bde45d..ee4cb75e8 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -17,6 +17,50 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl mysqlDir=${serverPath}/source/mysql +_os=`uname` +echo "use system: ${_os}" +if [ ${_os} == "Darwin" ]; then + OSNAME='macos' +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' + zypper refresh +elif grep -Eq "FreeBSD" /etc/*-release; then + OSNAME='freebsd' + pkg install -y wget unzip +elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then + OSNAME='arch' + echo y | pacman -Sy unzip +elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then + OSNAME='centos' + yum install -y wget zip unzip +elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then + OSNAME='fedora' + yum install -y wget zip unzip +elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then + OSNAME='rocky' + yum install -y wget zip unzip +elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then + OSNAME='alma' + yum install -y wget zip unzip +elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then + OSNAME='debian' + apt update -y + apt install -y devscripts + apt install -y wget zip unzip +elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then + OSNAME='ubuntu' + apt install -y wget zip unzip +else + OSNAME='unknow' +fi + +VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` + + + + + + Install_mysql() { mkdir -p ${mysqlDir} @@ -71,6 +115,21 @@ Install_mysql() OPTIONS="-DWITH_SSL=${serverPath}/lib/openssl" fi + WHERE_DIR_GCC=/usr/bin/gcc + WHERE_DIR_GPP=/usr/bin/g++ + if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then + yum install centos-release-scl -y + yum install devtoolset-9 -y + scl enable devtoolset-9 bash + gcc --version + + WHERE_DIR_GCC=`which gcc` + WHERE_DIR_GPP=`which g++` + echo $WHERE_DIR_GCC + echo $WHERE_DIR_GPP + exit 1 + fi + if [ ! -d $serverPath/mysql ];then cd ${mysqlDir}/mysql-8.0.25 && ${INSTALL_CMD} \ -DCMAKE_INSTALL_PREFIX=$serverPath/mysql \ @@ -88,8 +147,8 @@ Install_mysql() -DDOWNLOAD_BOOST=1 \ -DFORCE_INSOURCE_BUILD=1 \ $OPTIONS \ - -DCMAKE_C_COMPILER=/usr/bin/gcc \ - -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ + -DCMAKE_C_COMPILER=$WHERE_DIR_GCC \ + -DCMAKE_CXX_COMPILER=$WHERE_DIR_GPP \ -DWITH_BOOST=${mysqlDir}/mysql-8.0.25/boost/ make clean && make && make install && make clean From 2b10892a67732c40420ac6ac8cefbc84185ad314 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 14:44:51 +0800 Subject: [PATCH 249/263] Update install.sh --- plugins/mysql/versions/8.0/install.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index ee4cb75e8..8762b3d3b 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -120,14 +120,12 @@ Install_mysql() if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then yum install centos-release-scl -y yum install devtoolset-9 -y - scl enable devtoolset-9 bash + # scl enable devtoolset-9 bash gcc --version - - WHERE_DIR_GCC=`which gcc` - WHERE_DIR_GPP=`which g++` + WHERE_DIR_GCC=/opt/rh/devtoolset-9/root/usr/bin/gcc + WHERE_DIR_GPP=/opt/rh/devtoolset-9/root/usr/bin/g++ echo $WHERE_DIR_GCC echo $WHERE_DIR_GPP - exit 1 fi if [ ! -d $serverPath/mysql ];then From feff883004f7ead325e9cb6393b7a93925c563ff Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 14:53:12 +0800 Subject: [PATCH 250/263] Update install.sh --- plugins/mysql/versions/8.0/install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index 8762b3d3b..d32f3bd15 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -119,11 +119,11 @@ Install_mysql() WHERE_DIR_GPP=/usr/bin/g++ if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then yum install centos-release-scl -y - yum install devtoolset-9 -y - # scl enable devtoolset-9 bash + yum install devtoolset-7 -y + # scl enable devtoolset-7 bash gcc --version - WHERE_DIR_GCC=/opt/rh/devtoolset-9/root/usr/bin/gcc - WHERE_DIR_GPP=/opt/rh/devtoolset-9/root/usr/bin/g++ + WHERE_DIR_GCC=/opt/rh/devtoolset-7/root/usr/bin/gcc + WHERE_DIR_GPP=/opt/rh/devtoolset-7/root/usr/bin/g++ echo $WHERE_DIR_GCC echo $WHERE_DIR_GPP fi From d0572ea6bced7e16d3b747ed61d686788a7f49cf Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 15:10:40 +0800 Subject: [PATCH 251/263] Update install.sh --- plugins/mysql/versions/8.0/install.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index d32f3bd15..c2b861f20 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -58,7 +58,7 @@ VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk - - +VERSION=8.0.25 Install_mysql() @@ -84,25 +84,25 @@ Install_mysql() INSTALL_CMD=cmake3 fi - if [ ! -f ${mysqlDir}/mysql-boost-8.0.25.tar.gz ];then - wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz + if [ ! -f ${mysqlDir}/mysql-boost-${VERSION}.tar.gz ];then + wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${VERSION}.tar.gz fi #检测文件是否损坏. md5_mysql_ok=e142c2058313b4646c36fa9bb1b38493 - if [ -f ${mysqlDir}/mysql-boost-8.0.25.tar.gz ];then - md5_mysql=`md5sum ${mysqlDir}/mysql-boost-8.0.25.tar.gz | awk '{print $1}'` + if [ -f ${mysqlDir}/mysql-boost-${VERSION}.tar.gz ];then + md5_mysql=`md5sum ${mysqlDir}/mysql-boost-${VERSION}.tar.gz | awk '{print $1}'` if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then echo "mysql8.0 file check ok" else # 重新下载 - rm -rf ${mysqlDir}/mysql-8.0.25 - wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz + rm -rf ${mysqlDir}/mysql-${VERSION} + wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${VERSION}.tar.gz fi fi - if [ ! -d ${mysqlDir}/mysql-8.0.25 ];then - cd ${mysqlDir} && tar -zxvf ${mysqlDir}/mysql-boost-8.0.25.tar.gz + if [ ! -d ${mysqlDir}/mysql-${VERSION} ];then + cd ${mysqlDir} && tar -zxvf ${mysqlDir}/mysql-boost-${VERSION}.tar.gz fi OPTIONS='' @@ -129,7 +129,7 @@ Install_mysql() fi if [ ! -d $serverPath/mysql ];then - cd ${mysqlDir}/mysql-8.0.25 && ${INSTALL_CMD} \ + cd ${mysqlDir}/mysql-${VERSION} && ${INSTALL_CMD} \ -DCMAKE_INSTALL_PREFIX=$serverPath/mysql \ -DMYSQL_USER=mysql \ -DMYSQL_TCP_PORT=3306 \ @@ -147,14 +147,14 @@ Install_mysql() $OPTIONS \ -DCMAKE_C_COMPILER=$WHERE_DIR_GCC \ -DCMAKE_CXX_COMPILER=$WHERE_DIR_GPP \ - -DWITH_BOOST=${mysqlDir}/mysql-8.0.25/boost/ + -DWITH_BOOST=${mysqlDir}/mysql-${VERSION}/boost/ 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 + rm -rf ${mysqlDir}/mysql-${VERSION} echo '安装失败' > $install_tmp exit 1 fi From e7e831acd3590148b36c5771c6e79462c8ae3709 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 15:11:56 +0800 Subject: [PATCH 252/263] Update install.sh --- plugins/mysql/versions/8.0/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index c2b861f20..d02430446 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -58,7 +58,7 @@ VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk - -VERSION=8.0.25 +VERSION=8.0.29 Install_mysql() From f5d3541c5ded1edd07cbde37d2240bec69e32532 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 15:23:29 +0800 Subject: [PATCH 253/263] Update install.sh --- plugins/mysql/versions/8.0/install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index d02430446..bbf86e3ea 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -85,11 +85,11 @@ Install_mysql() fi if [ ! -f ${mysqlDir}/mysql-boost-${VERSION}.tar.gz ];then - wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${VERSION}.tar.gz + wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz --tries=3 https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${VERSION}.tar.gz fi #检测文件是否损坏. - md5_mysql_ok=e142c2058313b4646c36fa9bb1b38493 + md5_mysql_ok=42fbfe0569089c20f9aa457b3f367d50 if [ -f ${mysqlDir}/mysql-boost-${VERSION}.tar.gz ];then md5_mysql=`md5sum ${mysqlDir}/mysql-boost-${VERSION}.tar.gz | awk '{print $1}'` if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then @@ -97,7 +97,7 @@ Install_mysql() else # 重新下载 rm -rf ${mysqlDir}/mysql-${VERSION} - wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${VERSION}.tar.gz + wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz --tries=3 https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${VERSION}.tar.gz fi fi From 4473eb474029fbebeaf432379e06bd202e440812 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 15:34:50 +0800 Subject: [PATCH 254/263] Update centos.sh --- scripts/install/centos.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index b681f9626..71b06ed81 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -79,6 +79,7 @@ if [ "$?" != "0" ];then yum install -y oniguruma oniguruma-devel fi +yum install -y libzstd-devel yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip yum install -y python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-devel pcre pcre-devel yum install -y libjpeg-devel libpng-devel libwebp libwebp-devel From c7fc9e2069e2573c0e74a119cc8d2a527942f7ff Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 17:28:24 +0800 Subject: [PATCH 255/263] up --- route/static/app/site.js | 55 ++++++++++++++++----------------------- route/static/css/site.css | 12 ++++----- 2 files changed, 28 insertions(+), 39 deletions(-) diff --git a/route/static/app/site.js b/route/static/app/site.js index 71ba77390..cbd22d6d7 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -1548,14 +1548,13 @@ function to301(siteName, type, obj){ }; $.post('/site/save_redirect_conf', data, function(res) { layer.close(load) - var res = JSON.parse(res); if (res.status == true) { layer.msg('保存成功', {icon: 1}); layer.close(index); } else { layer.msg(res.msg, {time: 3000,icon: 2}); } - }); + },'json'); return true; }, }); @@ -1589,10 +1588,9 @@ function to301(siteName, type, obj){ $("#webedit-con").html(body); var loadT = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']}); - $.post('/site/get_redirect','siteName='+siteName, function(response) { + $.post('/site/get_redirect','siteName='+siteName, function(res) { layer.close(loadT); $("#md-301-loading").remove(); - let res = JSON.parse(response); if (res.status === true) { let data = res.data.result; data.forEach(function(item){ @@ -1609,7 +1607,7 @@ function to301(siteName, type, obj){ } else { layer.msg(res.msg, {icon:2}); } - }); + },'json'); } @@ -1620,27 +1618,33 @@ function toProxy(siteName, type, obj) { if(type == 1) { var proxy_form = layer.open({ type: 1, - skin: 'demo-class', area: '650px', title: "创建反向代理", closeBtn: 2, shift: 5, shadeClose: false, btn: ['提交','关闭'], - content: "
      " + + content: "" + "
      "+ - "目标URL" + - "
      " + - "" + - "
      " + + "目标URL" + + "
      " + + "" + + "
      " + "
      " + "
      " + - "代理目录" + - "
      " + - "" + - "发送域名" + - "" + + "代理目录" + + "
      " + + "" + + "发送域名" + + "" + + "
      " + "
      " + + "
      " + + "
        " + + "
      • 代理目录:访问这个目录时将会把目标URL的内容返回并显示(需要开启高级功能)
      • " + + "
      • 目标URL:可以填写你需要代理的站点,目标URL必须为可正常访问的URL,否则将返回错误
      • " + + "
      • 发送域名:将域名添加到请求头传递到代理服务器,默认为目标URL域名,若设置不当可能导致代理无法正常运行
      • " + + "
      " + "
      " + "", yes:function(){ @@ -1718,14 +1722,13 @@ function toProxy(siteName, type, obj) { }; $.post('/site/save_proxy_conf', data, function(res) { layer.close(load) - var res = JSON.parse(res); if (res.status == true) { layer.msg('保存成功', {icon: 1}); layer.close(index); } else { layer.msg(res.msg, {time: 3000,icon: 2}); } - }); + },'json'); return true; }, }); @@ -1736,7 +1739,6 @@ function toProxy(siteName, type, obj) { return } - var body = '
      \
      \ \ @@ -1750,8 +1752,7 @@ function toProxy(siteName, type, obj) { 操作\ \ \ - \ - \ + \ \
      \
      '; @@ -1781,18 +1782,6 @@ function toProxy(siteName, type, obj) { ///////// } -//文件验证 -// function file_check(){ -// $(".check_message").html('
      \ -// \ -// \ -//
      '); -// $("#lets_help").html('
    • 申请之前,请确保域名已解析,如未解析会导致审核失败
    • \ -//
    • Let\'s Encrypt免费证书,有效期3个月,支持多域名。默认会自动续签
    • \ -//
    • 若您的站点使用了CDN或301重定向会导致续签失败
    • \ -//
    • 在未指定SSL默认站点时,未开启SSL的站点使用HTTPS会直接访问到已开启SSL的站点
    • '); -// } - //证书夹 function sslAdmin(siteName){ var loadT = layer.msg('正在提交任务...',{icon:16,time:0,shade: [0.3, '#000']}); diff --git a/route/static/css/site.css b/route/static/css/site.css index 6dd9a7ab2..1d4c6c4f3 100755 --- a/route/static/css/site.css +++ b/route/static/css/site.css @@ -398,20 +398,20 @@ html { } .cursor { - cursor: pointer + cursor: pointer; } .help-info-text { - margin-top: 15px + margin-top: 15px; } .help-info-text>li { list-style: inside disc; - line-height: 24px + line-height: 24px; } .relative { - position: relative + position: relative; } .ico-copy { @@ -423,11 +423,11 @@ html { } .zclip embed { - vertical-align: top + vertical-align: top; } .webDelete .options { - padding: 20px 0 + padding: 20px 0; } .webDelete .options label { From 1eb490837063f7536942de469fc831a1d0513c37 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 21:29:48 +0800 Subject: [PATCH 256/263] update --- class/core/site_api.py | 73 ++++++++++++++++++++++++++++++---------- route/static/app/site.js | 70 +++++++++++++++++++++++++++++--------- 2 files changed, 111 insertions(+), 32 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index 2c9e01968..248e20278 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -135,7 +135,7 @@ class site_api: mid = request.form.get('id', '') name = request.form.get('name', '') - return self.stop(self, mid, name) + return self.stop(mid, name) def stop(self, mid, name): path = self.setupPath + '/stop' @@ -1219,13 +1219,13 @@ class site_api: content = mw.readFile(vhost_file) cnf_301 = ''' - #301-START + # 301-START include %s/*.conf; - #301-END + # 301-END ''' % (self.getRedirectPath( siteName)) cnf_301_source = ''' - #301-START + # 301-START ''' # print('operateRedirectConf', content.find('#301-END')) if content.find('#301-END') != -1: @@ -1411,13 +1411,13 @@ class site_api: content = mw.readFile(vhost_file) proxy_cnf = ''' - #PROXY-START + # PROXY-START include %s/*.conf; - #PROXY-END + # PROXY-END ''' % (self.getProxyPath(siteName)) proxy_cnf_source = ''' - #PROXY-START + # PROXY-START ''' if content.find('#PROXY-END') != -1: @@ -1436,12 +1436,34 @@ class site_api: if _id == '' or _siteName == '': return mw.returnJson(False, "必填项不能为空!") - data = mw.readFile( - "{}/{}/{}.conf".format(self.proxyPath, _siteName, _id)) + conf_file = "{}/{}/{}.conf".format(self.proxyPath, _siteName, _id) + if not os.path.exists(conf_file): + conf_file = "{}/{}/{}.conf.txt".format( + self.proxyPath, _siteName, _id) + + data = mw.readFile(conf_file) if data == False: return mw.returnJson(False, "获取失败!") return mw.returnJson(True, "ok", {"result": data}) + def setProxyStatusApi(self): + _siteName = request.form.get("siteName", '') + _status = request.form.get("status", '') + _id = request.form.get("id", '') + if _status == '' or _siteName == '' or _id == '': + return mw.returnJson(False, "必填项不能为空!") + + conf_file = "{}/{}/{}.conf".format(self.proxyPath, _siteName, _id) + conf_txt = "{}/{}/{}.conf.txt".format(self.proxyPath, _siteName, _id) + + if _status == '1': + mw.execShell('mv ' + conf_txt + ' ' + conf_file) + else: + mw.execShell('mv ' + conf_file + ' ' + conf_txt) + + mw.restartWeb() + return mw.returnJson(True, "OK") + def saveProxyConfApi(self): _siteName = request.form.get("siteName", '') _id = request.form.get("id", '') @@ -1484,6 +1506,16 @@ class site_api: mw.execShell("rm -rf {}/{}".format(self.proxyPath, _siteName)) return mw.returnJson(True, "", {"result": [], "count": 0}) + tmp = [] + for proxy in data: + proxy_dir = "{}/{}".format(self.proxyPath, _siteName) + proxy_dir_file = proxy_dir + '/' + proxy['id'] + '.conf' + if os.path.exists(proxy_dir_file): + proxy['status'] = True + else: + proxy['status'] = False + tmp.append(proxy) + return mw.returnJson(True, "ok", {"result": data, "count": len(data)}) # 设置 网站 反向代理列表 @@ -1492,6 +1524,7 @@ class site_api: _from = request.form.get('from', '') _to = request.form.get('to', '') _host = request.form.get('host', '') + _open_proxy = request.form.get('open_proxy', '') if _siteName == "" or _from == "" or _to == "" or _host == "": return mw.returnJson(False, "必填项不能为空") @@ -1514,7 +1547,7 @@ class site_api: return mw.returnJson(False, "错误的目标地址") tpl = """ -#PROXY-START/ +# PROXY-START/ location ~* \.(gif|png|jpg|css|js|woff|woff2)$ { proxy_pass {to}; @@ -1535,7 +1568,7 @@ location ~* ^{from}(.*)$ { proxy_ignore_headers Set-Cookie Cache-Control expires; add_header Cache-Control no-cache; } -#PROXY-END/ +# PROXY-END/ """ # replace @@ -1550,16 +1583,21 @@ location ~* ^{from}(.*)$ { if item["id"] == _id: return mw.returnJson(False, "已存在该规则!") if item["from"] == _from: - return mw.returnJson(False, "已存在该规则!") + return mw.returnJson(False, "代理目录已存在!") data.append({ "from": _from, "to": _to, "host": _host, "id": _id }) + + conf_file = "{}/{}.conf".format(self.getProxyPath(_siteName), _id) + if _open_proxy != 'on': + conf_file = "{}/{}.conf.txt".format( + self.getProxyPath(_siteName), _id) + mw.writeFile(data_path, json.dumps(data)) - mw.writeFile( - "{}/{}.conf".format(self.getProxyPath(_siteName), _id), tpl) + mw.writeFile(conf_file, tpl) self.operateProxyConf(_siteName, 'start') mw.restartWeb() @@ -1587,8 +1625,9 @@ location ~* ^{from}(.*)$ { if len(data) == 0: self.operateProxyConf(_siteName, 'stop') # remove conf file - mw.execShell( - "rm -rf {}/{}.conf".format(self.getProxyPath(_siteName), _id)) + cmd = "rm -rf {}/{}.conf*".format( + self.getProxyPath(_siteName), _id) + mw.execShell(cmd) except: return mw.returnJson(False, "删除失败!") @@ -1970,7 +2009,7 @@ location ~* ^{from}(.*)$ { return 404; } } - #SECURITY-END + # SECURITY-END include %s/enable-php-''' % (fix.strip().replace(',', '|'), domains.strip().replace(',', ' '), pre_path) conf = re.sub(re_path, rconf, conf) mw.writeLog('网站管理', '站点[' + name + ']已开启防盗链!') diff --git a/route/static/app/site.js b/route/static/app/site.js index cbd22d6d7..4656a6580 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -1611,9 +1611,17 @@ function to301(siteName, type, obj){ } +function toProxySwitch(){ + var status = $("input[name='open_proxy']").prop("checked")==true?1:0; + if(status==1){ + $("input[name='open_proxy']").prop("checked",false); + }else{ + $("input[name='open_proxy']").prop("checked",true); + } +} + //反向代理 function toProxy(siteName, type, obj) { - // 设置 页面展示 if(type == 1) { var proxy_form = layer.open({ @@ -1625,34 +1633,44 @@ function toProxy(siteName, type, obj) { shadeClose: false, btn: ['提交','关闭'], content: "
      " + - "
      "+ - "目标URL" + + "
      " + + '开启代理'+ "
      " + - "" + + "" + + "
      " + + "
      " + + "
      "+ + "代理目录" + + "
      " + + "" + "
      " + "
      " + "
      " + - "代理目录" + + "目标URL" + "
      " + - "" + + "" + "发送域名" + "" + "
      " + "
      " + "
      " + "
        " + - "
      • 代理目录:访问这个目录时将会把目标URL的内容返回并显示(需要开启高级功能)
      • " + + "
      • 代理目录:访问这个目录时将会把目标URL的内容返回并显示
      • " + "
      • 目标URL:可以填写你需要代理的站点,目标URL必须为可正常访问的URL,否则将返回错误
      • " + "
      • 发送域名:将域名添加到请求头传递到代理服务器,默认为目标URL域名,若设置不当可能导致代理无法正常运行
      • " + "
      " + "
      " + "", yes:function(){ - - var to = $('[name="to"]').val(); - var from = $('[name="from"]').val(); - var host = $('[name="host"]').val(); - $.post('/site/set_proxy', {siteName: siteName,from: from,to: to,host: host}, function(res) { + var data = $('#form_redirect').serializeArray(); + var t = {}; + t['name'] = 'siteName'; + t['value'] = siteName; + data.push(t); + + var loading = layer.msg('添加中...',{icon:16,time:0,shade: [0.3, '#000']}); + $.post('/site/set_proxy',data, function(res) { + layer.close(loading); if (res.status) { layer.close(proxy_form); toProxy(siteName) @@ -1683,7 +1701,6 @@ function toProxy(siteName, type, obj) { var data = {siteName: siteName,id: obj}; $.post('/site/get_proxy_conf', data, function(res) { layer.close(laoding); - res = JSON.parse(res); if (res.status == true) { var mBody = "
      \ \ @@ -1720,6 +1737,7 @@ function toProxy(siteName, type, obj) { id: obj, config: editor.getValue(), }; + $.post('/site/save_proxy_conf', data, function(res) { layer.close(load) if (res.status == true) { @@ -1735,10 +1753,25 @@ function toProxy(siteName, type, obj) { } else { layer.msg('请求错误!!', {time: 3000,icon: 2}); } - }); + },'json'); return } + if (type == 10 || type == 11) { + //[11]启动 或 停止[10] + status = type==10 ? '0' : '1'; + var loading = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']}); + $.post('/site/set_proxy_status', {siteName: siteName,'status':status,'id':obj}, function(res) { + layer.close(loading); + if (res.status == true) { + layer.msg('设置成功', {icon: 1,time: 1000}); + setTimeout(function(){toProxy(siteName);},1000); + } else { + layer.msg(res.msg, {time: 3000,icon: 2}); + } + },'json'); + } + var body = '
      \
      \ \ @@ -1749,6 +1782,7 @@ function toProxy(siteName, type, obj) { \ 代理目录\ 目标地址\ + 状态\ 操作\ \ \ @@ -1761,13 +1795,19 @@ function toProxy(siteName, type, obj) { var loadT = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']}); $.post("/site/get_proxy_list", {siteName: siteName},function (res) { layer.close(loadT); - $("#md-301-loading").remove(); if (res.status === true) { let data = res.data.result; data.forEach(function(item){ + // console.log(item); + var switchProxy = ''; + if (!item['status']){ + switchProxy = ''; + } + let tmp = '\ '+item.from+'\ '+item.to+'\ + '+switchProxy+'\ \ 详细 |\ 删除\ From 9e3934fb29a514a29ca67402ccf13e53b7f49dc3 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 21:46:13 +0800 Subject: [PATCH 257/263] Update site.js --- route/static/app/site.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/route/static/app/site.js b/route/static/app/site.js index 4656a6580..e1c634609 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -1764,12 +1764,13 @@ function toProxy(siteName, type, obj) { $.post('/site/set_proxy_status', {siteName: siteName,'status':status,'id':obj}, function(res) { layer.close(loading); if (res.status == true) { - layer.msg('设置成功', {icon: 1,time: 1000}); - setTimeout(function(){toProxy(siteName);},1000); + layer.msg('设置成功', {icon: 1}); + toProxy(siteName); } else { layer.msg(res.msg, {time: 3000,icon: 2}); } },'json'); + return; } var body = '
      \ @@ -1792,13 +1793,12 @@ function toProxy(siteName, type, obj) {
      '; $("#webedit-con").html(body); - var loadT = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']}); + var loading = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']}); $.post("/site/get_proxy_list", {siteName: siteName},function (res) { - layer.close(loadT); + layer.close(loading); if (res.status === true) { let data = res.data.result; data.forEach(function(item){ - // console.log(item); var switchProxy = ''; if (!item['status']){ switchProxy = ''; From 7a1dbfbf85f903024741ad76d8b4e4d39188d524 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 23:32:42 +0800 Subject: [PATCH 258/263] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E9=A2=84=E6=A3=80=E6=9F=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/plugins_api.py | 4 ++++ route/static/app/public.js | 6 ++--- route/static/app/soft.js | 49 +++++++++++++++++++++++++++++++++----- 3 files changed, 49 insertions(+), 10 deletions(-) diff --git a/class/core/plugins_api.py b/class/core/plugins_api.py index 3b1e26cc0..7b7773783 100755 --- a/class/core/plugins_api.py +++ b/class/core/plugins_api.py @@ -485,6 +485,7 @@ class plugins_api: "setup": False, "setup_version": "", "status": False, + "install_pre_inspection": False, } if checks.find('VERSION') > -1: @@ -507,6 +508,9 @@ class plugins_api: else: pInfo['setup_version'] = self.getVersion(pInfo['install_checks']) # pluginInfo['status'] = self.checkStatus(pluginInfo) + + if 'install_pre_inspection' in info: + pInfo['install_pre_inspection'] = info['install_pre_inspection'] pInfo['status'] = False return pInfo diff --git a/route/static/app/public.js b/route/static/app/public.js index e0b87726b..824562716 100755 --- a/route/static/app/public.js +++ b/route/static/app/public.js @@ -821,9 +821,7 @@ function fly(a) { }, onEnd: function() { layer.closeAll(); - layer.msg(lan.bt.task_add, { - icon: 1 - }); + layer.msg(lan.bt.task_add, {icon: 1}); getTaskCount(); } }); @@ -1350,7 +1348,7 @@ function webShell() { term.open(); term.setOption('cursorBlink', true); term.setOption('fontSize', 14); - gterm = term + gterm = term; socket.on('server_response', function (data) { term.write(data.data); diff --git a/route/static/app/soft.js b/route/static/app/soft.js index 8f59f2a80..7c2149375 100755 --- a/route/static/app/soft.js +++ b/route/static/app/soft.js @@ -98,12 +98,11 @@ function getSList(isdisplay) { } - var handle = '安装'; - + var handle = '安装'; if (plugin.setup == true) { - var mupdate = '';//(plugin.versions[n] == plugin.updates[n]) '' : '更新 | '; + var mupdate = '';//(plugin.versions[n] == plugin.updates[n]) '' : '更新 | '; // if (plugin.versions[n] == '') mupdate = ''; handle = mupdate + '设置 | 卸载'; titleClick = 'onclick="softMain(\'' + plugin.name + '\',\'' + plugin.setup_version + '\')" style="cursor:pointer"'; @@ -160,7 +159,24 @@ function getSList(isdisplay) { },'json'); } -function addVersion(name, ver, type, obj, title) { +function installPreInspection(name, ver, callback){ + var loading = layer.msg('正在检查安装环境...', { icon: 16, time: 0, shade: [0.3, '#000'] }); + $.post("/plugins/run", {'name':name,'version':ver,'func':'install_pre_inspection'}, function(rdata) { + layer.close(loading); + if (rdata.status){ + if (rdata.data == 'ok'){ + callback(); + } else { + layer.msg(rdata.data, { icon: 2 }); + } + } else { + layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 }); + } + },'json'); + +} + +function addVersion(name, ver, type, obj, title, install_pre_inspection) { var option = ''; var titlename = name; if (ver.indexOf('|') >= 0){ @@ -194,6 +210,9 @@ function addVersion(name, ver, type, obj, title) { }); $("#bi-btn").click(function() { + + + var info = $("#SelectVersion").val().toLowerCase(); if (info == ''){ info = $("#SelectVersion").text().toLowerCase(); @@ -203,15 +222,33 @@ function addVersion(name, ver, type, obj, title) { var type = $('.fangshi input').prop("checked") ? '1' : '0'; var data = "name=" + name + "&version=" + version + "&type=" + type; + if (install_pre_inspection){ + //安装检查 + installPreInspection(name,version, function(){ + var loadT = layer.msg('正在添加到安装器...', { icon: 16, time: 0, shade: [0.3, '#000'] }); + $.post("/plugins/install", data, function(rdata) { + layer.closeAll(); + layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 }); + getSList(); + },'json'); + + installTips(); + fly("bi-btn"); + }); + return; + } + var loadT = layer.msg('正在添加到安装器...', { icon: 16, time: 0, shade: [0.3, '#000'] }); $.post("/plugins/install", data, function(rdata) { layer.closeAll(); layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 }); getSList(); },'json'); + + installTips(); + fly("bi-btn"); }); - installTips(); - fly("bi-btn"); + } //卸载软件 From 9cf8dd030d703078b828928245693196d6f9fcb2 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 23:33:24 +0800 Subject: [PATCH 259/263] Update soft.js --- route/static/app/soft.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/route/static/app/soft.js b/route/static/app/soft.js index 7c2149375..3efd752d3 100755 --- a/route/static/app/soft.js +++ b/route/static/app/soft.js @@ -210,9 +210,6 @@ function addVersion(name, ver, type, obj, title, install_pre_inspection) { }); $("#bi-btn").click(function() { - - - var info = $("#SelectVersion").val().toLowerCase(); if (info == ''){ info = $("#SelectVersion").text().toLowerCase(); From 27b991941ce4db734718fa5f33e78ce27752ecb0 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 6 Jul 2022 00:36:33 +0800 Subject: [PATCH 260/263] =?UTF-8?q?max=5Finput=5Fvars=20=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/conf/php7.ini | 2 +- plugins/php/conf/php8.ini | 2 +- plugins/php/index.py | 7 ++++--- plugins/php/js/php.js | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/php/conf/php7.ini b/plugins/php/conf/php7.ini index 0f3de82dd..5b5885e21 100644 --- a/plugins/php/conf/php7.ini +++ b/plugins/php/conf/php7.ini @@ -12,7 +12,7 @@ zend.enable_gc = On expose_php = On max_execution_time = 30 max_input_time = 60 -max_input_var = 1000 +max_input_vars = 1000 memory_limit = 128M error_reporting = E_ALL display_errors = On diff --git a/plugins/php/conf/php8.ini b/plugins/php/conf/php8.ini index ef23fb53f..33a3d9f2d 100644 --- a/plugins/php/conf/php8.ini +++ b/plugins/php/conf/php8.ini @@ -12,7 +12,7 @@ zend.enable_gc = On expose_php = On max_execution_time = 30 max_input_time = 60 -max_input_var = 1000 +max_input_vars = 1000 memory_limit = 128M error_reporting = E_ALL display_errors = On diff --git a/plugins/php/index.py b/plugins/php/index.py index 47770eb23..2e22abbc1 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -346,7 +346,7 @@ def getPhpConf(version): {'name': 'asp_tags', 'type': 1, 'ps': 'ASP标签支持'}, {'name': 'max_execution_time', 'type': 2, 'ps': '最大脚本运行时间'}, {'name': 'max_input_time', 'type': 2, 'ps': '最大输入时间'}, - {'name': 'max_input_var', 'type': 2, 'ps': '最大输入数量'}, + {'name': 'max_input_vars', 'type': 2, 'ps': '最大输入数量'}, {'name': 'memory_limit', 'type': 2, 'ps': '脚本内存限制'}, {'name': 'post_max_size', 'type': 2, 'ps': 'POST数据最大尺寸'}, {'name': 'file_uploads', 'type': 1, 'ps': '是否允许上传文件'}, @@ -372,7 +372,7 @@ def getPhpConf(version): def submitPhpConf(version): gets = ['display_errors', 'cgi.fix_pathinfo', 'date.timezone', 'short_open_tag', - 'asp_tags', 'max_execution_time', 'max_input_time', 'memory_limit', + 'asp_tags', 'max_execution_time', 'max_input_time', 'max_input_vars', 'memory_limit', 'post_max_size', 'file_uploads', 'upload_max_filesize', 'max_file_uploads', 'default_socket_timeout', 'error_reporting'] args = getArgs() @@ -384,7 +384,8 @@ def submitPhpConf(version): val = g + ' = ' + args[g] + '\n' phpini = re.sub(rep, val, phpini) mw.writeFile(filename, phpini) - mw.execShell(getServerDir() + '/init.d/php' + version + ' reload') + # mw.execShell(getServerDir() + '/init.d/php' + version + ' reload') + reload(version) return mw.returnJson(True, '设置成功') diff --git a/plugins/php/js/php.js b/plugins/php/js/php.js index e3a109b42..56fdb5c5b 100755 --- a/plugins/php/js/php.js +++ b/plugins/php/js/php.js @@ -111,6 +111,7 @@ function submitConf(version) { safe_mode: $("select[name='safe_mode']").val(), max_execution_time: $("input[name='max_execution_time']").val(), max_input_time: $("input[name='max_input_time']").val(), + max_input_vars: $("input[name='max_input_vars']").val(), memory_limit: $("input[name='memory_limit']").val(), post_max_size: $("input[name='post_max_size']").val(), file_uploads: $("select[name='file_uploads']").val(), From d7b1e677a90fd73f20daffa511b5df3ea998c8b3 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 6 Jul 2022 00:41:53 +0800 Subject: [PATCH 261/263] Update php5.ini --- plugins/php/conf/php5.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/php/conf/php5.ini b/plugins/php/conf/php5.ini index 1b1729452..465dcff82 100644 --- a/plugins/php/conf/php5.ini +++ b/plugins/php/conf/php5.ini @@ -12,7 +12,7 @@ zend.enable_gc = On expose_php = On max_execution_time = 30 max_input_time = 60 -max_input_var = 1000 +max_input_vars = 1000 memory_limit = 128M error_reporting = E_ALL display_errors = On From 96b8ea13e1fafef1b35f46d0cbe89aa2618797ce Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 6 Jul 2022 00:55:43 +0800 Subject: [PATCH 262/263] Update index.py --- plugins/php/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index 2e22abbc1..1c062e83b 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -302,7 +302,7 @@ def restart(version): def reload(version): - return phpOp(version, 'reload') + return phpOp(version, 'restart') def initdStatus(version): From 22f8b059486cd3aec0a410d6054b332af539dc54 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 6 Jul 2022 08:42:10 +0800 Subject: [PATCH 263/263] Update compatibility.md --- compatibility.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compatibility.md b/compatibility.md index 346eab294..73e23e398 100644 --- a/compatibility.md +++ b/compatibility.md @@ -14,7 +14,7 @@ cd /www/server/mdserver-web/plugins/php && bash all_test.sh | 系统名称 | 面板 | OpenResty | | ----------------- |---------------|---------------| | CentOS 7.9 |✅ |✅ | -| CentOS 8.4 |:x: |✅ | +| CentOS 8.4 |✅ |✅ | | CentOS 8 Stream |✅ |✅ | | CentOS 9 Stream |✅ |✅ | | Debian 10.3 |✅ |✅ | @@ -32,7 +32,7 @@ cd /www/server/mdserver-web/plugins/php && bash all_test.sh | 系统名称 | PHP52 |PHP53 |PHP54 |PHP55 |PHP56 |PHP70 |PHP71 |PHP72 |PHP73 |PHP74 |PHP80 |PHP81 | | ----------------- |-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------| | CentOS 7.9 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | -| CentOS 8.4 |:x: |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | +| CentOS 8.4 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | | CentOS 8 Stream |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | | CentOS 9 Stream |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ | | Debian 10.3 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |