From 370ff99134c1f722b474f30f83a14b80f531476f Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 11 Sep 2026 21:10:03 +0800 Subject: [PATCH] update --- plugins/apache/versions/2.4/install.sh | 2 +- plugins/docker/install.sh | 2 +- plugins/doh/install.sh | 4 ++-- plugins/mysql/index.py | 7 +++--- plugins/php-apt/versions/common/opcache.sh | 4 ++-- plugins/php-apt/versions/common/phalcon.sh | 26 +++++++++++----------- plugins/php-apt/versions/common/sg11.sh | 8 +++---- plugins/php-apt/versions/common/yaf.sh | 6 ++--- plugins/php-apt/versions/common/yar.sh | 6 ++--- plugins/php-guard/install.sh | 2 +- plugins/php-yum/install.sh | 12 +++++----- plugins/php-yum/versions/74/install.sh | 4 ++-- plugins/php-yum/versions/81/install.sh | 4 ++-- plugins/php-yum/versions/82/install.sh | 4 ++-- plugins/php-yum/versions/85/install.sh | 4 ++-- plugins/php-yum/versions/common.sh | 6 ++--- plugins/php-yum/versions/common/ioncube.sh | 4 ++-- plugins/php-yum/versions/lib.sh | 24 ++++++++++---------- 18 files changed, 65 insertions(+), 64 deletions(-) diff --git a/plugins/apache/versions/2.4/install.sh b/plugins/apache/versions/2.4/install.sh index eab9eeb66..514b3eb61 100644 --- a/plugins/apache/versions/2.4/install.sh +++ b/plugins/apache/versions/2.4/install.sh @@ -90,7 +90,7 @@ Install_App() cd ${apacheDir} && tar -jxf apr-util-${APR_UTIL_VERSION}.tar.bz2 cd ${apacheDir}/apr-util-${APR_UTIL_VERSION} && ./configure --prefix=${serverPath}/apache/apr-util --with-apr=${serverPath}/apache/apr make -j${cpuCore} && make install - if [ "$?" == "0" ];then + if [ "$?" = "0" ];then # 检查 APR-util 配置文件 APU_CONFIG=$(find ${serverPath}/apache/apr-util -name "apu-*config" | head -1) if [ -z "$APU_CONFIG" ];then diff --git a/plugins/docker/install.sh b/plugins/docker/install.sh index a0fb74d77..44cf87669 100755 --- a/plugins/docker/install.sh +++ b/plugins/docker/install.sh @@ -40,7 +40,7 @@ fi Install_Docker() { # which docker - # if [ "$?" == "0" ];then + # if [ "$?" = "0" ];then # echo '安装已经完成docker' # exit 0 # fi diff --git a/plugins/doh/install.sh b/plugins/doh/install.sh index 64bd80d88..7e86fbb9f 100755 --- a/plugins/doh/install.sh +++ b/plugins/doh/install.sh @@ -43,7 +43,7 @@ Install_App() echo '正在安装脚本文件...' version=$1 - if [ "macos" == "$OSNAME" ];then + if [ "macos" = "$OSNAME" ];then echo "not support!" exit else @@ -95,7 +95,7 @@ Uninstall_App() action=$1 version=$2 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_App $version else Uninstall_App $version diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 60a86da0a..1b73b8a5c 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -66,9 +66,10 @@ def getArgs(): if t.strip() == '': tmp = [] else: - t = t.split(':',1) - tmp[t[0]] = t[1] - tmp[t[0]] = t[1] + arg_t = t.split(',') + for i in range(len(arg_t)): + t = arg_t[i].split(':',1) + tmp[t[0]] = t[1] elif args_len > 1: for i in range(len(args)): t = args[i].split(':',1) diff --git a/plugins/php-apt/versions/common/opcache.sh b/plugins/php-apt/versions/common/opcache.sh index 0fe8cfbad..8537ecee1 100755 --- a/plugins/php-apt/versions/common/opcache.sh +++ b/plugins/php-apt/versions/common/opcache.sh @@ -26,7 +26,7 @@ if [ ! -f $OP_BL ];then touch $OP_BL fi -if [ "$actionType" == 'install' ];then +if [ "$actionType" = 'install' ];then apt install -y php${version}-${LIBNAME} echo "ls ${ext_dir} | grep "${LIBNAME}.ini"| cut -d \ -f 1" @@ -54,7 +54,7 @@ if [ "$actionType" == 'install' ];then echo "opcache.save_comments=0" >> $ext_file echo "opcache.blacklist_filename=${OP_BL}" >> $ext_file -elif [ "$actionType" == 'uninstall' ];then +elif [ "$actionType" = 'uninstall' ];then rm -rf $ext_file echo 'cannot uninstall' fi \ No newline at end of file diff --git a/plugins/php-apt/versions/common/phalcon.sh b/plugins/php-apt/versions/common/phalcon.sh index 758ee0961..78d05b89f 100755 --- a/plugins/php-apt/versions/common/phalcon.sh +++ b/plugins/php-apt/versions/common/phalcon.sh @@ -24,33 +24,33 @@ LIBV=0 # fi CMD='apt ' -if [ "$actionType" == 'install' ];then +if [ "$actionType" = 'install' ];then CMD="$CMD install -y php${version}-" -elif [ "$actionType" == 'uninstall' ];then +elif [ "$actionType" = 'uninstall' ];then CMD="$CMD uninstall -y php${version}-" fi -if [ "$version" == '5.6' ];then +if [ "$version" = '5.6' ];then CMD="${CMD}phalcon3" -elif [[ "$version" == '7.0' ]]; then +elif [[ "$version" = '7.0' ]]; then CMD="${CMD}phalcon3" -elif [[ "$version" == '7.1' ]]; then +elif [[ "$version" = '7.1' ]]; then CMD="${CMD}phalcon3" -elif [[ "$version" == '7.2' ]]; then +elif [[ "$version" = '7.2' ]]; then CMD="${CMD}phalcon4" -elif [[ "$version" == '7.3' ]]; then +elif [[ "$version" = '7.3' ]]; then CMD="${CMD}phalcon3" -elif [[ "$version" == '7.4' ]]; then +elif [[ "$version" = '7.4' ]]; then CMD="${CMD}phalcon4" -elif [[ "$version" == '8.0' ]]; then +elif [[ "$version" = '8.0' ]]; then CMD="${CMD}phalcon5" -elif [[ "$version" == '8.1' ]]; then +elif [[ "$version" = '8.1' ]]; then CMD="${CMD}phalcon5" -elif [[ "$version" == '8.2' ]]; then +elif [[ "$version" = '8.2' ]]; then CMD="${CMD}phalcon5" -elif [[ "$version" == '8.3' ]]; then +elif [[ "$version" = '8.3' ]]; then CMD="${CMD}phalcon5" -elif [[ "$version" == '8.4' ]]; then +elif [[ "$version" = '8.4' ]]; then CMD="${CMD}phalcon5" fi diff --git a/plugins/php-apt/versions/common/sg11.sh b/plugins/php-apt/versions/common/sg11.sh index e10e2d3bf..7577163a5 100644 --- a/plugins/php-apt/versions/common/sg11.sh +++ b/plugins/php-apt/versions/common/sg11.sh @@ -24,7 +24,7 @@ SG_VER=${version} extVer=`bash $curPath/lib.sh $version` extFile=/usr/lib/php/${extVer}/${LIBNAME}.so -if [ "$sysName" == "Darwin" ];then +if [ "$sysName" = "Darwin" ];then BAK='_bak' else BAK='' @@ -41,7 +41,7 @@ Install_lib() DEFAULT_OSNAME=linux-x86_64 SUFFIX_NAME=lin - if [ "$OSNAME" == 'macos' ];then + if [ "$OSNAME" = 'macos' ];then DEFAULT_OSNAME=macosx SUFFIX_NAME=dar fi @@ -116,8 +116,8 @@ Uninstall_lib() } -if [ "$actionType" == 'install' ];then +if [ "$actionType" = 'install' ];then Install_lib -elif [ "$actionType" == 'uninstall' ];then +elif [ "$actionType" = 'uninstall' ];then Uninstall_lib fi \ No newline at end of file diff --git a/plugins/php-apt/versions/common/yaf.sh b/plugins/php-apt/versions/common/yaf.sh index ccbca3c91..036b18c15 100755 --- a/plugins/php-apt/versions/common/yaf.sh +++ b/plugins/php-apt/versions/common/yaf.sh @@ -26,7 +26,7 @@ extFile=/usr/lib/php/${extVer}/${LIBNAME}.so -if [ "$sysName" == "Darwin" ];then +if [ "$sysName" = "Darwin" ];then BAK='_bak' else BAK='' @@ -94,8 +94,8 @@ Uninstall_lib() } -if [ "$actionType" == 'install' ];then +if [ "$actionType" = 'install' ];then Install_lib -elif [ "$actionType" == 'uninstall' ];then +elif [ "$actionType" = 'uninstall' ];then Uninstall_lib fi \ No newline at end of file diff --git a/plugins/php-apt/versions/common/yar.sh b/plugins/php-apt/versions/common/yar.sh index 4e1aaa64a..b944660ba 100755 --- a/plugins/php-apt/versions/common/yar.sh +++ b/plugins/php-apt/versions/common/yar.sh @@ -30,7 +30,7 @@ extFile=/usr/lib/php/${extVer}/${LIBNAME}.so -if [ "$sysName" == "Darwin" ];then +if [ "$sysName" = "Darwin" ];then BAK='_bak' else BAK='' @@ -98,8 +98,8 @@ Uninstall_lib() } -if [ "$actionType" == 'install' ];then +if [ "$actionType" = 'install' ];then Install_lib -elif [ "$actionType" == 'uninstall' ];then +elif [ "$actionType" = 'uninstall' ];then Uninstall_lib fi \ No newline at end of file diff --git a/plugins/php-guard/install.sh b/plugins/php-guard/install.sh index b1edae490..f23571d68 100755 --- a/plugins/php-guard/install.sh +++ b/plugins/php-guard/install.sh @@ -27,7 +27,7 @@ Uninstall_pg() action=$1 host=$2 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_pg else Uninstall_pg diff --git a/plugins/php-yum/install.sh b/plugins/php-yum/install.sh index 4ed4d994b..ca30d6be9 100755 --- a/plugins/php-yum/install.sh +++ b/plugins/php-yum/install.sh @@ -19,7 +19,7 @@ fi action=$1 type=$2 -if [ "${2}" == "" ];then +if [ "${2}" = "" ];then echo '缺少安装脚本...' exit 0 fi @@ -37,21 +37,21 @@ bash ${rootPath}/scripts/getos.sh OSNAME=`cat ${rootPath}/data/osname.pl` VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` -if [ "$OSNAME" == "alma" ];then +if [ "$OSNAME" = "alma" ];then rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-${VERSION_ID}.rpm fi -if [ "$OSNAME" == "rocky" ];then +if [ "$OSNAME" = "rocky" ];then rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-${VERSION_ID}.rpm fi -if [ "$OSNAME" == "centos" ];then +if [ "$OSNAME" = "centos" ];then rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-${VERSION_ID}.rpm fi # rpm -Uvh http://rpms.remirepo.net/fedora/remi-release-31.rpm -if [ "$OSNAME" == "fedora" ];then +if [ "$OSNAME" = "fedora" ];then rpm -Uvh http://rpms.remirepo.net/fedora/remi-release-${VERSION_ID}.rpm fi @@ -75,7 +75,7 @@ fi cd ${curPath} && sh -x $curPath/versions/$2/install.sh $1 -if [ "${action}" == "install" ] && [ -d ${serverPath}/php-yum/${type} ];then +if [ "${action}" = "install" ] && [ -d ${serverPath}/php-yum/${type} ];then # 安装通用扩展 echo "install PHP-YUM[${type}] extend start" diff --git a/plugins/php-yum/versions/74/install.sh b/plugins/php-yum/versions/74/install.sh index b2098e1e5..687474b9b 100755 --- a/plugins/php-yum/versions/74/install.sh +++ b/plugins/php-yum/versions/74/install.sh @@ -18,7 +18,7 @@ Install_php() #------------------------ install start ------------------------------------# yum install -y php74 php74-php-fpm -if [ "$?" == "0" ];then +if [ "$?" = "0" ];then mkdir -p $serverPath/php-yum/${PHP_VER} fi @@ -33,7 +33,7 @@ Uninstall_php() } action=${1} -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_php else Uninstall_php diff --git a/plugins/php-yum/versions/81/install.sh b/plugins/php-yum/versions/81/install.sh index 5877e21df..e9590a47d 100755 --- a/plugins/php-yum/versions/81/install.sh +++ b/plugins/php-yum/versions/81/install.sh @@ -17,7 +17,7 @@ Install_php() { #------------------------ install start ------------------------------------# yum install -y php81 php81-php-fpm -if [ "$?" == "0" ];then +if [ "$?" = "0" ];then mkdir -p $serverPath/php-yum/${PHP_VER} fi @@ -32,7 +32,7 @@ Uninstall_php() } action=${1} -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_php else Uninstall_php diff --git a/plugins/php-yum/versions/82/install.sh b/plugins/php-yum/versions/82/install.sh index 6440c2966..d88350f9a 100755 --- a/plugins/php-yum/versions/82/install.sh +++ b/plugins/php-yum/versions/82/install.sh @@ -17,7 +17,7 @@ Install_php() { #------------------------ install start ------------------------------------# yum install -y php82 php82-php-fpm -if [ "$?" == "0" ];then +if [ "$?" = "0" ];then mkdir -p $serverPath/php-yum/${PHP_VER} fi @@ -32,7 +32,7 @@ Uninstall_php() } action=${1} -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_php else Uninstall_php diff --git a/plugins/php-yum/versions/85/install.sh b/plugins/php-yum/versions/85/install.sh index 98c778845..617f599b9 100755 --- a/plugins/php-yum/versions/85/install.sh +++ b/plugins/php-yum/versions/85/install.sh @@ -17,7 +17,7 @@ Install_php() { #------------------------ install start ------------------------------------# yum install -y php85 php85-php-fpm -if [ "$?" == "0" ];then +if [ "$?" = "0" ];then mkdir -p $serverPath/php-yum/${PHP_VER} fi @@ -32,7 +32,7 @@ Uninstall_php() } action=${1} -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_php else Uninstall_php diff --git a/plugins/php-yum/versions/common.sh b/plugins/php-yum/versions/common.sh index 7eb72bfd8..e4786a448 100644 --- a/plugins/php-yum/versions/common.sh +++ b/plugins/php-yum/versions/common.sh @@ -24,7 +24,7 @@ FILE_COMMON=${curPath}/common/${extName}.sh # yum install -y php74-php-pecl-mysql -if [ "$action" == 'install' ];then +if [ "$action" = 'install' ];then if [ -f $FILE ];then bash ${curPath}/${version}/${extName}.sh install @@ -41,7 +41,7 @@ if [ "$action" == 'install' ];then fi # yum remove -y php81-php-yar -if [ "$action" == 'uninstall' ];then +if [ "$action" = 'uninstall' ];then if [ -f $FILE ];then bash ${curPath}/${version}/${extName}.sh uninstall @@ -63,7 +63,7 @@ echo "yum remove -y php${version}-php-pecl-${extName}" echo "systemctl restart php${version}-php-fpm" php_status=`systemctl status php${version}-php-fpm | grep inactive` echo "php_status:${php_status}" -if [ "$php_status" == "" ];then +if [ "$php_status" = "" ];then systemctl restart php${version}-php-fpm fi diff --git a/plugins/php-yum/versions/common/ioncube.sh b/plugins/php-yum/versions/common/ioncube.sh index feb87ab73..90ba45f47 100755 --- a/plugins/php-yum/versions/common/ioncube.sh +++ b/plugins/php-yum/versions/common/ioncube.sh @@ -87,8 +87,8 @@ Uninstall_lib() } -if [ "$actionType" == 'install' ];then +if [ "$actionType" = 'install' ];then Install_lib -elif [ "$actionType" == 'uninstall' ];then +elif [ "$actionType" = 'uninstall' ];then Uninstall_lib fi \ No newline at end of file diff --git a/plugins/php-yum/versions/lib.sh b/plugins/php-yum/versions/lib.sh index 91a8e8d27..9d78d6fcd 100644 --- a/plugins/php-yum/versions/lib.sh +++ b/plugins/php-yum/versions/lib.sh @@ -34,28 +34,28 @@ serverPath=$(dirname "$rootPath") version=$1 -if [ "$version" == '5.6' ];then +if [ "$version" = '5.6' ];then echo '20131226' -elif [[ "$version" == '7.0' ]]; then +elif [[ "$version" = '7.0' ]]; then echo '20151012' -elif [[ "$version" == '7.1' ]]; then +elif [[ "$version" = '7.1' ]]; then echo '20160303' -elif [[ "$version" == '7.2' ]]; then +elif [[ "$version" = '7.2' ]]; then echo '20170718' -elif [[ "$version" == '7.3' ]]; then +elif [[ "$version" = '7.3' ]]; then echo '20180731' -elif [[ "$version" == '7.4' ]]; then +elif [[ "$version" = '7.4' ]]; then echo '20190902' -elif [[ "$version" == '8.0' ]]; then +elif [[ "$version" = '8.0' ]]; then echo '20200930' -elif [[ "$version" == '8.1' ]]; then +elif [[ "$version" = '8.1' ]]; then echo '20210902' -elif [[ "$version" == '8.2' ]]; then +elif [[ "$version" = '8.2' ]]; then echo '20220829' -elif [[ "$version" == '8.3' ]]; then +elif [[ "$version" = '8.3' ]]; then echo '20230831' -elif [[ "$version" == '8.4' ]]; then +elif [[ "$version" = '8.4' ]]; then echo '20240924' -elif [[ "$version" == '8.5' ]]; then +elif [[ "$version" = '8.5' ]]; then echo '20250925' fi \ No newline at end of file