diff --git a/plugins/haproxy/versions/2.6/install.sh b/plugins/haproxy/versions/2.6/install.sh index 4ccca13bf..7d4ee43b8 100755 --- a/plugins/haproxy/versions/2.6/install.sh +++ b/plugins/haproxy/versions/2.6/install.sh @@ -39,7 +39,7 @@ Install_App() if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then - if [ $sysName == 'Darwin' ]; then + if [ $sysName = 'Darwin' ]; then wget --no-check-certificate -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz else curl -sSLo ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz @@ -53,7 +53,7 @@ Install_App() cd ${APP_DIR} && tar -zxvf haproxy-${VERSION}.tar.gz - if [ "$OSNAME" == "macos" ];then + if [ "$OSNAME" = "macos" ];then cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=osx && make install PREFIX=$serverPath/haproxy else cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy diff --git a/plugins/haproxy/versions/2.8/install.sh b/plugins/haproxy/versions/2.8/install.sh index 6be26adf6..0863c3939 100755 --- a/plugins/haproxy/versions/2.8/install.sh +++ b/plugins/haproxy/versions/2.8/install.sh @@ -53,7 +53,7 @@ Install_App() cd ${APP_DIR} && tar -zxvf haproxy-${VERSION}.tar.gz - if [ "$OSNAME" == "macos" ];then + if [ "$OSNAME" = "macos" ];then cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=osx && make install PREFIX=$serverPath/haproxy else cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy diff --git a/plugins/mariadb/versions/10.6/install.sh b/plugins/mariadb/versions/10.6/install.sh index a4fca6383..10ead40e7 100755 --- a/plugins/mariadb/versions/10.6/install.sh +++ b/plugins/mariadb/versions/10.6/install.sh @@ -65,7 +65,7 @@ Install_app() fi OPTIONS='' - if [ "$sysName" == "Darwin" ];then + if [ "$sysName" = "Darwin" ];then OPTIONS='-DPLUGIN_TOKUDB=NO' fi diff --git a/plugins/mariadb/versions/11.1/install.sh b/plugins/mariadb/versions/11.1/install.sh index 3617d9cf3..1863a92cb 100755 --- a/plugins/mariadb/versions/11.1/install.sh +++ b/plugins/mariadb/versions/11.1/install.sh @@ -113,7 +113,7 @@ Uninstall_app() } action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_app else Uninstall_app diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh index 718387c75..a03243daf 100755 --- a/plugins/mongodb/install.sh +++ b/plugins/mongodb/install.sh @@ -34,7 +34,7 @@ echo "use system: ${sysName}" OSNAME=`bash ${rootPath}/scripts/getos.sh` -if [ "" == "$OSNAME" ];then +if [ "" = "$OSNAME" ];then OSNAME=`cat ${rootPath}/data/osname.pl` fi diff --git a/plugins/mongodb/versions/3.0/centos.sh b/plugins/mongodb/versions/3.0/centos.sh index 41e2ca714..b99fe5eb7 100644 --- a/plugins/mongodb/versions/3.0/centos.sh +++ b/plugins/mongodb/versions/3.0/centos.sh @@ -20,11 +20,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a SYS_NAME=${SYS_VERSION_ID/./} SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L` -if [ "$SYS_NAME_LEN" == "1" ];then +if [ "$SYS_NAME_LEN" = "1" ];then SYS_NAME=${SYS_NAME}0 fi -if [ "$SYS_ARCH" == "aarch64" ];then +if [ "$SYS_ARCH" = "aarch64" ];then if [ "$SYS_NAME" -gt "82" ];then SYS_NAME="82" fi diff --git a/plugins/mongodb/versions/3.0/rhel.sh b/plugins/mongodb/versions/3.0/rhel.sh index 93fc66752..6eeb1a537 100644 --- a/plugins/mongodb/versions/3.0/rhel.sh +++ b/plugins/mongodb/versions/3.0/rhel.sh @@ -15,7 +15,7 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a SYS_NAME=${SYS_VERSION_ID/./} SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L` -if [ "$SYS_NAME_LEN" == "1" ];then +if [ "$SYS_NAME_LEN" = "1" ];then SYS_NAME=${SYS_NAME}0 fi diff --git a/plugins/mongodb/versions/4.4/centos.sh b/plugins/mongodb/versions/4.4/centos.sh index f8a52e340..ca6e28c0a 100644 --- a/plugins/mongodb/versions/4.4/centos.sh +++ b/plugins/mongodb/versions/4.4/centos.sh @@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a SYS_NAME=${SYS_VERSION_ID/./} SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L` -if [ "$SYS_NAME_LEN" == "1" ];then +if [ "$SYS_NAME_LEN" = "1" ];then SYS_NAME=${SYS_NAME}0 fi -if [ "$SYS_ARCH" == "aarch64" ];then +if [ "$SYS_ARCH" = "aarch64" ];then if [ "$SYS_NAME" -gt "82" ];then SYS_NAME="82" fi @@ -70,7 +70,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} #--------------- mongosh tool install ------------------ # TOOL_VERSION=2.2.5 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64 fi TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz diff --git a/plugins/mongodb/versions/4.4/debian.sh b/plugins/mongodb/versions/4.4/debian.sh index 4a5939d43..712b32a9c 100644 --- a/plugins/mongodb/versions/4.4/debian.sh +++ b/plugins/mongodb/versions/4.4/debian.sh @@ -47,7 +47,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} #--------------- mongosh tool install ------------------ # TOOL_VERSION=2.2.5 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64 fi TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz @@ -67,11 +67,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME} #--------------- mongodb database install ------------------ # TOOL_VERSION=100.16.1 TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION} -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION} fi -if [ "arm64" == ${SYS_ARCH} ];then +if [ "arm64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION} fi diff --git a/plugins/mongodb/versions/4.4/macos.sh b/plugins/mongodb/versions/4.4/macos.sh index 31c2b832f..0d4009cfd 100644 --- a/plugins/mongodb/versions/4.4/macos.sh +++ b/plugins/mongodb/versions/4.4/macos.sh @@ -30,11 +30,11 @@ fi #--------------- mongosh tool install ------------------ # TOOL_VERSION=2.2.5 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-x64 -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64 fi -if [ "arm64" == ${SYS_ARCH} ];then +if [ "arm64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64 fi TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip @@ -54,11 +54,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME} # https://fastdl.mongodb.org/tools/db/mongodb-database-tools-macos-arm64-100.9.4.zip TOOL_VERSION=100.9.4 TOOL_FILE_NAME=mongodb-database-tools-macos-x86_64-${TOOL_VERSION} -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION} fi -if [ "arm64" == ${SYS_ARCH} ];then +if [ "arm64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION} fi diff --git a/plugins/mongodb/versions/4.4/opensuse.sh b/plugins/mongodb/versions/4.4/opensuse.sh index 5171db064..435599fe6 100644 --- a/plugins/mongodb/versions/4.4/opensuse.sh +++ b/plugins/mongodb/versions/4.4/opensuse.sh @@ -50,7 +50,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} #--------------- mongosh tool install ------------------ # TOOL_VERSION=2.2.5 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64 fi TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz @@ -71,11 +71,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME} #--------------- mongodb database install ------------------ # TOOL_VERSION=100.9.4 TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-x86_64-${TOOL_VERSION} -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION} fi -if [ "arm64" == ${SYS_ARCH} ];then +if [ "arm64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION} fi diff --git a/plugins/mongodb/versions/4.4/rhel.sh b/plugins/mongodb/versions/4.4/rhel.sh index 57646001e..b47f2079f 100644 --- a/plugins/mongodb/versions/4.4/rhel.sh +++ b/plugins/mongodb/versions/4.4/rhel.sh @@ -15,7 +15,7 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a SYS_NAME=${SYS_VERSION_ID/./} SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L` -if [ "$SYS_NAME_LEN" == "1" ];then +if [ "$SYS_NAME_LEN" = "1" ];then SYS_NAME=${SYS_NAME}0 fi @@ -46,7 +46,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} #--------------- mongosh tool install ------------------ # TOOL_VERSION=2.2.5 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64 fi TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz diff --git a/plugins/mongodb/versions/6.0/centos.sh b/plugins/mongodb/versions/6.0/centos.sh index 6a0230bc6..42b45e71c 100644 --- a/plugins/mongodb/versions/6.0/centos.sh +++ b/plugins/mongodb/versions/6.0/centos.sh @@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a SYS_NAME=${SYS_VERSION_ID/./} SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L` -if [ "$SYS_NAME_LEN" == "1" ];then +if [ "$SYS_NAME_LEN" = "1" ];then SYS_NAME=${SYS_NAME}0 fi -if [ "$SYS_ARCH" == "aarch64" ];then +if [ "$SYS_ARCH" = "aarch64" ];then if [ "$SYS_NAME" -gt "90" ];then SYS_NAME="90" fi @@ -64,7 +64,7 @@ rm -rf ${MG_DIR}/${FILE_NAME} #--------------- mongosh tool install ------------------ # TOOL_VERSION=2.2.5 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64 fi TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz @@ -84,11 +84,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME} #--------------- mongodb database install ------------------ # TOOL_VERSION=100.9.4 TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION} -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION} fi -if [ "arm64" == ${SYS_ARCH} ];then +if [ "arm64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION} fi diff --git a/plugins/mongodb/versions/6.0/debian.sh b/plugins/mongodb/versions/6.0/debian.sh index 9db8e1825..889a26427 100644 --- a/plugins/mongodb/versions/6.0/debian.sh +++ b/plugins/mongodb/versions/6.0/debian.sh @@ -47,7 +47,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} #--------------- mongosh tool install ------------------ # TOOL_VERSION=2.2.5 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64 fi TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz diff --git a/plugins/mongodb/versions/6.0/macos.sh b/plugins/mongodb/versions/6.0/macos.sh index 839ade0d1..7d429edc5 100644 --- a/plugins/mongodb/versions/6.0/macos.sh +++ b/plugins/mongodb/versions/6.0/macos.sh @@ -34,7 +34,7 @@ if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64 fi -if [ "arm64" == ${SYS_ARCH} ];then +if [ "arm64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64 fi TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip diff --git a/plugins/mongodb/versions/6.0/ubuntu.sh b/plugins/mongodb/versions/6.0/ubuntu.sh index 3caddb560..c010bab79 100644 --- a/plugins/mongodb/versions/6.0/ubuntu.sh +++ b/plugins/mongodb/versions/6.0/ubuntu.sh @@ -48,7 +48,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} #--------------- mongosh tool install ------------------ # TOOL_VERSION=2.2.5 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64 fi TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz @@ -68,11 +68,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME} #--------------- mongodb database install ------------------ # TOOL_VERSION=100.9.4 TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-x86_64-${TOOL_VERSION} -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION} fi -if [ "arm64" == ${SYS_ARCH} ];then +if [ "arm64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION} fi diff --git a/plugins/mongodb/versions/7.0/centos.sh b/plugins/mongodb/versions/7.0/centos.sh index 20d766944..bd9406020 100644 --- a/plugins/mongodb/versions/7.0/centos.sh +++ b/plugins/mongodb/versions/7.0/centos.sh @@ -15,7 +15,7 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a SYS_NAME=${SYS_VERSION_ID/./} SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L` -if [ "$SYS_NAME_LEN" == "1" ];then +if [ "$SYS_NAME_LEN" = "1" ];then SYS_NAME=${SYS_NAME}0 fi diff --git a/plugins/mongodb/versions/7.0/debian.sh b/plugins/mongodb/versions/7.0/debian.sh index 98ac54e29..349a4f2a2 100644 --- a/plugins/mongodb/versions/7.0/debian.sh +++ b/plugins/mongodb/versions/7.0/debian.sh @@ -22,7 +22,7 @@ if [ "$SYS_NAME" -lt "11" ];then SYS_NAME="11" fi -if [ "$SYS_NAME" == "" ];then +if [ "$SYS_NAME" = "" ];then SYS_NAME="11" fi @@ -73,7 +73,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME} #--------------- mongodb database install ------------------ # TOOL_VERSION=100.9.4 TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION} -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION} fi diff --git a/plugins/mongodb/versions/8.0/centos.sh b/plugins/mongodb/versions/8.0/centos.sh index b6cfdede9..d975779bb 100644 --- a/plugins/mongodb/versions/8.0/centos.sh +++ b/plugins/mongodb/versions/8.0/centos.sh @@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a SYS_NAME=${SYS_VERSION_ID/./} SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L` -if [ "$SYS_NAME_LEN" == "1" ];then +if [ "$SYS_NAME_LEN" = "1" ];then SYS_NAME=${SYS_NAME}0 fi -if [ "$SYS_ARCH" == "aarch64" ];then +if [ "$SYS_ARCH" = "aarch64" ];then if [ "$SYS_NAME" -gt "90" ];then SYS_NAME="90" fi @@ -63,7 +63,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} #--------------- mongosh tool install ------------------ # TOOL_VERSION=2.2.5 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64 fi TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz @@ -85,11 +85,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME} #--------------- mongodb database install ------------------ # TOOL_VERSION=100.9.4 TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION} -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION} fi -if [ "arm64" == ${SYS_ARCH} ];then +if [ "arm64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION} fi diff --git a/plugins/mongodb/versions/8.0/euler.sh b/plugins/mongodb/versions/8.0/euler.sh index b6cfdede9..c2afd63b6 100644 --- a/plugins/mongodb/versions/8.0/euler.sh +++ b/plugins/mongodb/versions/8.0/euler.sh @@ -63,7 +63,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} #--------------- mongosh tool install ------------------ # TOOL_VERSION=2.2.5 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64 fi TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz @@ -85,11 +85,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME} #--------------- mongodb database install ------------------ # TOOL_VERSION=100.9.4 TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION} -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION} fi -if [ "arm64" == ${SYS_ARCH} ];then +if [ "arm64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION} fi diff --git a/plugins/mongodb/versions/8.2/centos.sh b/plugins/mongodb/versions/8.2/centos.sh index ed1cae3f4..ebfa21f1c 100644 --- a/plugins/mongodb/versions/8.2/centos.sh +++ b/plugins/mongodb/versions/8.2/centos.sh @@ -15,7 +15,7 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a SYS_NAME=${SYS_VERSION_ID/./} SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L` -if [ "$SYS_NAME_LEN" == "1" ];then +if [ "$SYS_NAME_LEN" = "1" ];then SYS_NAME=${SYS_NAME}0 fi @@ -63,7 +63,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} #--------------- mongosh tool install ------------------ # TOOL_VERSION=2.2.5 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64 fi TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz @@ -85,11 +85,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME} #--------------- mongodb database install ------------------ # TOOL_VERSION=100.9.4 TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION} -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION} fi -if [ "arm64" == ${SYS_ARCH} ];then +if [ "arm64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION} fi diff --git a/plugins/mongodb/versions/8.2/debian.sh b/plugins/mongodb/versions/8.2/debian.sh index 891bd543b..7a53f0a5b 100644 --- a/plugins/mongodb/versions/8.2/debian.sh +++ b/plugins/mongodb/versions/8.2/debian.sh @@ -62,11 +62,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME} #--------------- mongodb database install ------------------ # TOOL_VERSION=100.9.4 TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION} -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION} fi -if [ "arm64" == ${SYS_ARCH} ];then +if [ "arm64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION} fi diff --git a/plugins/mongodb/versions/8.2/euler.sh b/plugins/mongodb/versions/8.2/euler.sh index ed1cae3f4..ecdc49817 100644 --- a/plugins/mongodb/versions/8.2/euler.sh +++ b/plugins/mongodb/versions/8.2/euler.sh @@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a SYS_NAME=${SYS_VERSION_ID/./} SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L` -if [ "$SYS_NAME_LEN" == "1" ];then +if [ "$SYS_NAME_LEN" = "1" ];then SYS_NAME=${SYS_NAME}0 fi -if [ "$SYS_ARCH" == "aarch64" ];then +if [ "$SYS_ARCH" = "aarch64" ];then if [ "$SYS_NAME" -gt "90" ];then SYS_NAME="90" fi @@ -63,7 +63,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} #--------------- mongosh tool install ------------------ # TOOL_VERSION=2.2.5 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64 fi TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz @@ -85,11 +85,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME} #--------------- mongodb database install ------------------ # TOOL_VERSION=100.9.4 TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION} -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION} fi -if [ "arm64" == ${SYS_ARCH} ];then +if [ "arm64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION} fi diff --git a/plugins/mongodb/versions/8.2/macos.sh b/plugins/mongodb/versions/8.2/macos.sh index 715115df0..2ef9b0090 100644 --- a/plugins/mongodb/versions/8.2/macos.sh +++ b/plugins/mongodb/versions/8.2/macos.sh @@ -40,7 +40,7 @@ fi #--------------- mongosh tool install ------------------ # TOOL_VERSION=2.2.5 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-x64 -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64 fi @@ -65,11 +65,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME} # https://fastdl.mongodb.org/tools/db/mongodb-database-tools-macos-arm64-100.9.4.zip TOOL_VERSION=100.9.4 TOOL_FILE_NAME=mongodb-database-tools-macos-x86_64-${TOOL_VERSION} -if [ "aarch64" == ${SYS_ARCH} ];then +if [ "aarch64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION} fi -if [ "arm64" == ${SYS_ARCH} ];then +if [ "arm64" = ${SYS_ARCH} ];then TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION} fi diff --git a/plugins/msonedrive/install.sh b/plugins/msonedrive/install.sh index 38a839417..13a73f9d2 100644 --- a/plugins/msonedrive/install.sh +++ b/plugins/msonedrive/install.sh @@ -33,9 +33,9 @@ Uninstall_App() rm -rf $serverPath/msonedrive } -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_App -elif [ "${1}" == 'uninstall' ];then +elif [ "${1}" = 'uninstall' ];then Uninstall_App else echo 'Error!'; diff --git a/plugins/mtproxy/install.sh b/plugins/mtproxy/install.sh index 22c9c9fe1..13a8b36fd 100755 --- a/plugins/mtproxy/install.sh +++ b/plugins/mtproxy/install.sh @@ -100,7 +100,7 @@ Install_app() apt install -y golang golang-src fi - if [ "$sysName" == "darwin" ]; then + if [ "$sysName" = "darwin" ]; then ARCH=arm64 DOWNLOAD_URL="https://github.com/9seconds/mtg/releases/download/$VERSION/mtg-${VERSION_MIN}-${sysName}-arm64.tar.gz" elif [ "$sysName" != "macos" ]; then diff --git a/plugins/mysql-community/install.sh b/plugins/mysql-community/install.sh index 53054a997..9573d6a8d 100755 --- a/plugins/mysql-community/install.sh +++ b/plugins/mysql-community/install.sh @@ -43,7 +43,7 @@ fi _os=`uname` echo "use system: ${_os}" -if [ ${_os} == "Darwin" ]; then +if [ ${_os} = "Darwin" ]; then OSNAME='macos' elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' @@ -111,7 +111,7 @@ if [[ "$OSNAME" == "debian" ]] && [[ "$VERSION_ID" =~ "13" ]]; then cd $cur_dir fi -if [ "${2}" == "" ];then +if [ "${2}" = "" ];then echo '缺少安装脚本...' exit 0 fi @@ -121,7 +121,7 @@ if [ ! -d $curPath/versions/$2 ];then exit 0 fi -if [ "${action}" == "uninstall" ];then +if [ "${action}" = "uninstall" ];then cd ${rootPath} && python3 ${rootPath}/plugins/mysql-community/index.py stop ${type} cd ${rootPath} && python3 ${rootPath}/plugins/mysql-community/index.py initd_uninstall ${type} @@ -139,7 +139,7 @@ fi sh -x $curPath/versions/$2/install_generic.sh $1 -if [ "${action}" == "install" ];then +if [ "${action}" = "install" ];then #初始化 if [ "$?" != "0" ];then diff --git a/plugins/mysql-community/versions/8.4/install_generic.sh b/plugins/mysql-community/versions/8.4/install_generic.sh index 261e19a58..bf7dc94e7 100755 --- a/plugins/mysql-community/versions/8.4/install_generic.sh +++ b/plugins/mysql-community/versions/8.4/install_generic.sh @@ -73,7 +73,7 @@ Uninstall_mysql() } action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_mysql else Uninstall_mysql diff --git a/plugins/mysql/versions/5.5/install.sh b/plugins/mysql/versions/5.5/install.sh index 8eda49b73..c3b390e54 100755 --- a/plugins/mysql/versions/5.5/install.sh +++ b/plugins/mysql/versions/5.5/install.sh @@ -152,13 +152,13 @@ Install_mysql() cd ${mysqlDir}/mysql-5.5.62 && patch -p1 < ${rootPath}/plugins/mysql/patch/mysql-5.5-fix-arm-client_plugin.patch fi - if [ "$OSNAME" == "ubuntu" ];then + if [ "$OSNAME" = "ubuntu" ];then Install_dep fi OPTIONS='' - if [ "$OSNAME" == "debian" ] && [ "$VERSION_ID" == "13" ];then + if [ "$OSNAME" = "debian" ] && [ "$VERSION_ID" = "13" ];then Install_dep_debain13 # export CFLAGS="-D__s64=long long -D__u64='unsigned long long' -D__s32=int -D__u32='unsigned int' -D__u16='unsigned short'" # export CXXFLAGS="$CFLAGS" diff --git a/plugins/mysql/versions/5.7/install.sh b/plugins/mysql/versions/5.7/install.sh index 98f6e77c0..7f32cc5e0 100755 --- a/plugins/mysql/versions/5.7/install.sh +++ b/plugins/mysql/versions/5.7/install.sh @@ -174,11 +174,11 @@ Install_mysql() WHERE_DIR_GPP=`which g++` fi - if [ "$OSNAME" == "ubuntu" ];then + if [ "$OSNAME" = "ubuntu" ];then Install_dep fi - if [ "$OSNAME" == "debian" ] && [ "$VERSION_ID" == "13" ];then + if [ "$OSNAME" = "debian" ] && [ "$VERSION_ID" = "13" ];then Install_dep_debain13 fi diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index e689d7f76..b8bab9aba 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -130,7 +130,7 @@ Install_mysql() WHERE_DIR_GCC=/usr/bin/gcc WHERE_DIR_GPP=/usr/bin/g++ - if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then + if [ "$OSNAME" = "centos" ] && [ "$VERSION_ID" = "7" ];then yum install -y libudev-devel yum install -y centos-release-scl yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils @@ -142,7 +142,7 @@ Install_mysql() echo $WHERE_DIR_GPP fi - if [ "$OSNAME" == "ubuntu" ] && [ "$VERSION_ID" == "18.04" ];then + if [ "$OSNAME" = "ubuntu" ] && [ "$VERSION_ID" = "18.04" ];then apt install -y libudev-dev apt install -y libtirpc-dev apt install -y libssl-dev diff --git a/plugins/mysql/versions/8.2/install.sh b/plugins/mysql/versions/8.2/install.sh index 70141889e..47314d21e 100755 --- a/plugins/mysql/versions/8.2/install.sh +++ b/plugins/mysql/versions/8.2/install.sh @@ -130,7 +130,7 @@ Install_mysql() WHERE_DIR_GCC=/usr/bin/gcc WHERE_DIR_GPP=/usr/bin/g++ - if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then + if [ "$OSNAME" = "centos" ] && [ "$VERSION_ID" = "7" ];then yum install -y libudev-devel yum install -y centos-release-scl yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils @@ -142,7 +142,7 @@ Install_mysql() echo $WHERE_DIR_GPP fi - if [ "$OSNAME" == "ubuntu" ];then + if [ "$OSNAME" = "ubuntu" ];then apt install -y libudev-dev apt install -y libtirpc-dev apt install -y libssl-dev @@ -164,7 +164,7 @@ Install_mysql() fi - if [ "$OSNAME" == "opensuse" ];then + if [ "$OSNAME" = "opensuse" ];then zypper install -y gcc11 zypper install -y gcc11-c++ diff --git a/plugins/mysql/versions/9.0/install.sh b/plugins/mysql/versions/9.0/install.sh index c69d63ec0..fdea9b8da 100755 --- a/plugins/mysql/versions/9.0/install.sh +++ b/plugins/mysql/versions/9.0/install.sh @@ -171,7 +171,7 @@ Install_mysql() fi - if [ "$OSNAME" == "opensuse" ];then + if [ "$OSNAME" = "opensuse" ];then zypper install -y gcc11 zypper install -y gcc11-c++ diff --git a/plugins/mysql/versions/9.1/install.sh b/plugins/mysql/versions/9.1/install.sh index c723d7971..8ac0c5320 100755 --- a/plugins/mysql/versions/9.1/install.sh +++ b/plugins/mysql/versions/9.1/install.sh @@ -144,7 +144,7 @@ Install_mysql() echo $WHERE_DIR_GPP fi - if [ "$OSNAME" == "ubuntu" ];then + if [ "$OSNAME" = "ubuntu" ];then apt install -y libudev-dev apt install -y libtirpc-dev apt install -y libssl-dev diff --git a/plugins/mysql/versions/9.4/install.sh b/plugins/mysql/versions/9.4/install.sh index 491fdfc21..8b6adf317 100755 --- a/plugins/mysql/versions/9.4/install.sh +++ b/plugins/mysql/versions/9.4/install.sh @@ -170,7 +170,7 @@ Install_mysql() fi - if [ "$OSNAME" == "opensuse" ];then + if [ "$OSNAME" = "opensuse" ];then zypper install -y gcc11 zypper install -y gcc11-c++ diff --git a/plugins/nezha/versions/2.2.6/install.sh b/plugins/nezha/versions/2.2.6/install.sh index ebd3ce7e4..e51f8a487 100755 --- a/plugins/nezha/versions/2.2.6/install.sh +++ b/plugins/nezha/versions/2.2.6/install.sh @@ -173,7 +173,7 @@ Uninstall_App() } action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_App else Uninstall_App diff --git a/plugins/ollama/versions/1.0/install.sh b/plugins/ollama/versions/1.0/install.sh index 46d295eef..d39caf1b4 100755 --- a/plugins/ollama/versions/1.0/install.sh +++ b/plugins/ollama/versions/1.0/install.sh @@ -70,7 +70,7 @@ Uninstall_App() } action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_App else Uninstall_App diff --git a/plugins/op_load_balance/install.sh b/plugins/op_load_balance/install.sh index 64b4206c2..30309b610 100755 --- a/plugins/op_load_balance/install.sh +++ b/plugins/op_load_balance/install.sh @@ -37,7 +37,7 @@ Uninstall_App(){ action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_App else Uninstall_App diff --git a/plugins/op_waf/install.sh b/plugins/op_waf/install.sh index 177ebd585..17756bad7 100755 --- a/plugins/op_waf/install.sh +++ b/plugins/op_waf/install.sh @@ -20,7 +20,7 @@ if [ -f ${rootPath}/bin/activate ];then . ${rootPath}/bin/activate fi -if [ "$sys_os" == "Darwin" ];then +if [ "$sys_os" = "Darwin" ];then BAK='_bak' else BAK='' diff --git a/plugins/op_waf/t/ngx_debug.sh b/plugins/op_waf/t/ngx_debug.sh index 1e50adadb..d904aa6bc 100644 --- a/plugins/op_waf/t/ngx_debug.sh +++ b/plugins/op_waf/t/ngx_debug.sh @@ -5,7 +5,7 @@ export PATH=$PATH:/opt/stap/bin:/opt/stapxx # cd /www/server/mdserver-web/plugins/op_waf/t && bash ngx_debug.sh c ok -if [ ${_os} == "Darwin" ]; then +if [ ${_os} = "Darwin" ]; then OSNAME='macos' elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' @@ -124,12 +124,12 @@ for pid in ${pids[@]}; do echo "${name}_${pid}.svg -- make ok" done -# if [ $1 == "lua" ]; then +# if [ $1 = "lua" ]; then # # /opt/openresty-systemtap-toolkit/ngx-sample-lua-bt -p 377452 --luajit20 -t 30 >temp.bt # /opt/openresty-systemtap-toolkit/ngx-sample-lua-bt -p $pid --luajit20 -t 30 >temp.bt # # /opt/openresty-systemtap-toolkit/fix-lua-bt temp.bt >t1.bt # /opt/openresty-systemtap-toolkit/fix-lua-bt temp.bt >${name}.bt -# elif [ $1 == "c" ]; then +# elif [ $1 = "c" ]; then # # /opt/openresty-systemtap-toolkit/sample-bt -p 496435 -t 10 -u > t2.bt # /opt/openresty-systemtap-toolkit/sample-bt -p $pid -t 10 -u > ${name}.bt # else diff --git a/plugins/openresty/check.sh b/plugins/openresty/check.sh index e6b36e6de..e6d98b014 100755 --- a/plugins/openresty/check.sh +++ b/plugins/openresty/check.sh @@ -27,7 +27,7 @@ else fi NGINX_IDS=`ps -ef|grep nginx | grep -v grep| awk '{print $2}'` -if [ "$NGINX_IDS" == "" ];then +if [ "$NGINX_IDS" = "" ];then ps -ef|grep nginx| grep -v grep| awk '{print $2}' | xargs kill -9 systemctl start "$service_name" echo "OpenResty未运行,正在启动服务..." diff --git a/plugins/openresty/versions/1.25.3/install.sh b/plugins/openresty/versions/1.25.3/install.sh index 8db6b5fb4..95e5add5e 100644 --- a/plugins/openresty/versions/1.25.3/install.sh +++ b/plugins/openresty/versions/1.25.3/install.sh @@ -20,7 +20,7 @@ openrestyDir=${serverPath}/source/openresty Install_openresty() { - if [ "${action}" == "install" ];then + if [ "${action}" = "install" ];then if [ -d $serverPath/openresty ];then exit 0 fi @@ -60,7 +60,7 @@ Install_openresty() fi DOWNLOAD_SIZE=`wc -c ${openrestyDir}/openresty-${VERSION}.tar.gz | awk '{print $1}'` - if [ "$DOWNLOAD_SIZE" == "0" ];then + if [ "$DOWNLOAD_SIZE" = "0" ];then echo 'download failed, download again' rm -rf ${openrestyDir}/openresty-${VERSION}.tar.gz fi @@ -77,7 +77,7 @@ Install_openresty() opensslVersion="3.4.4" libresslVersion="3.9.1" pcreVersion='8.45' - if [ "$sysName" == "Darwin" ];then + if [ "$sysName" = "Darwin" ];then if [ ! -f ${openrestyDir}/pcre-${pcreVersion}.tar.gz ];then wget --no-check-certificate -O ${openrestyDir}/pcre-${pcreVersion}.tar.gz https://netix.dl.sourceforge.net/project/pcre/pcre/${pcreVersion}/pcre-${pcreVersion}.tar.gz @@ -160,7 +160,7 @@ Install_openresty() cd ${openrestyDir} && wget -O $openrestyDir/zstd-nginx-module.tar.gz https://github.com/tokers/zstd-nginx-module/archive/refs/heads/master.tar.gz cd ${openrestyDir} && tar -zxvf zstd-nginx-module.tar.gz - if [ "$sysName" == "Darwin" ];then + if [ "$sysName" = "Darwin" ];then export ZSTD_INC=/opt/homebrew/include export ZSTD_LIB=/opt/homebrew/lib fi @@ -217,9 +217,9 @@ Uninstall_openresty() } action=$1 -if [ "${1}" == "install" ];then +if [ "${1}" = "install" ];then Install_openresty -elif [ "${1}" == "upgrade" ];then +elif [ "${1}" = "upgrade" ];then Install_openresty else Uninstall_openresty diff --git a/plugins/openresty/versions/1.29.2/install.sh b/plugins/openresty/versions/1.29.2/install.sh index d6d6264de..b33dfc333 100644 --- a/plugins/openresty/versions/1.29.2/install.sh +++ b/plugins/openresty/versions/1.29.2/install.sh @@ -180,7 +180,7 @@ Install_openresty() # 用于调式 CMD_MAKE=`which gmake` - if [ "$?" == "0" ];then + if [ "$?" = "0" ];then gmake -j${cpuCore} && gmake install && gmake clean else make -j${cpuCore} && make install && make clean diff --git a/plugins/php/lib/icu.sh b/plugins/php/lib/icu.sh index b635f5ff8..811f09409 100644 --- a/plugins/php/lib/icu.sh +++ b/plugins/php/lib/icu.sh @@ -16,7 +16,7 @@ SOURCE_ROOT=$rootPath/source/lib HTTP_PREFIX="https://" LOCAL_ADDR=common cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") -if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then +if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then LOCAL_ADDR=cn HTTP_PREFIX="https://mirror.ghproxy.com/" fi diff --git a/plugins/php/versions/52/install.sh b/plugins/php/versions/52/install.sh index b32a7dca7..07ae74da6 100755 --- a/plugins/php/versions/52/install.sh +++ b/plugins/php/versions/52/install.sh @@ -27,7 +27,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then # 中国优化安装 cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"") LOCAL_ADDR=common - if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then + if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then LOCAL_ADDR=cn fi diff --git a/plugins/php/versions/52/intl.sh b/plugins/php/versions/52/intl.sh index 93804f74e..dbaaa63c2 100755 --- a/plugins/php/versions/52/intl.sh +++ b/plugins/php/versions/52/intl.sh @@ -21,7 +21,7 @@ version=$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 -if [ "$sysName" == "Darwin" ];then +if [ "$sysName" = "Darwin" ];then BAK='_bak' else BAK='' diff --git a/plugins/php/versions/53/apc.sh b/plugins/php/versions/53/apc.sh index a34967930..ee6a21f01 100755 --- a/plugins/php/versions/53/apc.sh +++ b/plugins/php/versions/53/apc.sh @@ -20,7 +20,7 @@ version=$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 -if [ "$sysName" == "Darwin" ];then +if [ "$sysName" = "Darwin" ];then BAK='_bak' else BAK='' @@ -47,7 +47,7 @@ Install_lib() cd $php_lib/${_LIBNAME}-${LIBV} OPTIONS='' - if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then + if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu" fi @@ -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/versions/53/install.sh b/plugins/php/versions/53/install.sh index feb326607..d9a7be92a 100755 --- a/plugins/php/versions/53/install.sh +++ b/plugins/php/versions/53/install.sh @@ -66,12 +66,12 @@ fi # OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib" OPTIONS='--without-iconv' -if [ $sysName == 'Darwin' ]; then +if [ $sysName = 'Darwin' ]; then OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype" fi IS_64BIT=`getconf LONG_BIT` -if [ "$IS_64BIT" == "64" ];then +if [ "$IS_64BIT" = "64" ];then OPTIONS="${OPTIONS} --with-libdir=lib64" fi @@ -165,7 +165,7 @@ Uninstall_php() } action=${1} -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_php else Uninstall_php diff --git a/plugins/php/versions/53/opcache.sh b/plugins/php/versions/53/opcache.sh index 783c64d5f..aef3f4765 100755 --- a/plugins/php/versions/53/opcache.sh +++ b/plugins/php/versions/53/opcache.sh @@ -46,7 +46,7 @@ Install_lib() cd $php_lib/zendopcache-7.0.5 OPTIONS='' - if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then + if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu" fi @@ -107,8 +107,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/versions/54/install.sh b/plugins/php/versions/54/install.sh index 1c57bd48d..ed843f278 100755 --- a/plugins/php/versions/54/install.sh +++ b/plugins/php/versions/54/install.sh @@ -29,7 +29,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then # 中国优化安装 cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"") LOCAL_ADDR=common - if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then + if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then LOCAL_ADDR=cn fi @@ -96,11 +96,11 @@ else fi # ----- cpu end ------ -if [ "${SYS_ARCH}" == "aarch64" ];then +if [ "${SYS_ARCH}" = "aarch64" ];then OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu" fi -if [ "${SYS_ARCH}" == "arm64" ] && [ "$sysName" == "Darwin" ] ;then +if [ "${SYS_ARCH}" = "arm64" ] && [ "$sysName" = "Darwin" ] ;then # 修复mac arm64架构下php安装 # 修复不能识别到sys_icache_invalidate cat ${curPath}/versions/${PHP_VER}/src/ext/pcre/sljitConfigInternal.h > $sourcePath/php/php${PHP_VER}/ext/pcre/pcrelib/sljit/sljitConfigInternal.h @@ -173,7 +173,7 @@ Uninstall_php() } action=${1} -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_php else Uninstall_php diff --git a/plugins/php/versions/54/zendguardloader.sh b/plugins/php/versions/54/zendguardloader.sh index 197a5cbb6..20fd89b2d 100755 --- a/plugins/php/versions/54/zendguardloader.sh +++ b/plugins/php/versions/54/zendguardloader.sh @@ -14,7 +14,7 @@ sourcePath=${serverPath}/source/php LIBNAME=ZendGuardLoader sysName=`uname` -if [ "$sysName" == "Darwin" ];then +if [ "$sysName" = "Darwin" ];then BAK='_bak' else BAK='' @@ -89,8 +89,8 @@ Uninstall_lib() actionType=$1 version=$2 -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/versions/56/install.sh b/plugins/php/versions/56/install.sh index f89badba9..f41d7b2c3 100755 --- a/plugins/php/versions/56/install.sh +++ b/plugins/php/versions/56/install.sh @@ -99,14 +99,14 @@ fi -if [ "${SYS_ARCH}" == "aarch64" ];then +if [ "${SYS_ARCH}" = "aarch64" ];then # 修复aarch64架构下安装 # /www/server/mdserver-web/plugins/php/versions/56/src/zend_multiply.h > /www/server/source/php/php56/Zend/zend_multiply.h cat ${curPath}/versions/${PHP_VER}/src/zend_multiply.h > $sourcePath/php/php${PHP_VER}/Zend/zend_multiply.h fi -if [ "${SYS_ARCH}" == "arm64" ] && [ "$sysName" == "Darwin" ] ;then +if [ "${SYS_ARCH}" = "arm64" ] && [ "$sysName" = "Darwin" ] ;then # 修复mac arm64架构下php安装 # 修复不能识别到sys_icache_invalidate cat ${curPath}/versions/${PHP_VER}/src/ext/pcre/sljitConfigInternal.h > $sourcePath/php/php${PHP_VER}/ext/pcre/pcrelib/sljit/sljitConfigInternal.h @@ -155,7 +155,7 @@ Uninstall_php() } action=${1} -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_php else Uninstall_php diff --git a/plugins/php/versions/70/install.sh b/plugins/php/versions/70/install.sh index f97d34be7..82c22eb4e 100755 --- a/plugins/php/versions/70/install.sh +++ b/plugins/php/versions/70/install.sh @@ -158,7 +158,7 @@ Uninstall_php() } action=${1} -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_php else Uninstall_php diff --git a/plugins/php/versions/73/install.sh b/plugins/php/versions/73/install.sh index 17e538f7a..431c44c50 100755 --- a/plugins/php/versions/73/install.sh +++ b/plugins/php/versions/73/install.sh @@ -206,7 +206,7 @@ Uninstall_php() } action=${1} -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_php else Uninstall_php diff --git a/plugins/php/versions/81/install.sh b/plugins/php/versions/81/install.sh index 6ef34558b..b8034c277 100755 --- a/plugins/php/versions/81/install.sh +++ b/plugins/php/versions/81/install.sh @@ -65,12 +65,12 @@ fi cd $sourcePath/php/php${PHP_VER} OPTIONS='--without-iconv' -# if [ $sysName == 'Darwin' ]; then +# if [ $sysName = 'Darwin' ]; then # OPTIONS="${OPTIONS} --with-curl" # fi argon_version=`pkg-config libargon2 --modversion` -if [ "$?" == "0" ];then +if [ "$?" = "0" ];then OPTIONS="${OPTIONS} --with-password-argon2" fi @@ -154,7 +154,7 @@ Uninstall_php() } action=${1} -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_php else Uninstall_php diff --git a/plugins/php/versions/84/install.sh b/plugins/php/versions/84/install.sh index 304fbf377..76e99638f 100755 --- a/plugins/php/versions/84/install.sh +++ b/plugins/php/versions/84/install.sh @@ -24,7 +24,7 @@ cd ${rootPath}/plugins/php/lib && /bin/bash zlib.sh # redat ge 8 which yum -if [ "$?" == "0" ];then +if [ "$?" = "0" ];then cd ${rootPath}/plugins/php/lib && /bin/bash oniguruma.sh fi @@ -38,7 +38,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then LOCAL_ADDR=cn fi - if [ "$LOCAL_ADDR" == "cn" ];then + if [ "$LOCAL_ADDR" = "cn" ];then if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz fi @@ -109,7 +109,7 @@ fi # OPTIONS="${OPTIONS} --enable-debug" # OPTIONS="${OPTIONS} --enable-dtrace" -if [ "$sysName" == "Darwin" ];then +if [ "$sysName" = "Darwin" ];then BREW_DIR=`which brew` BREW_DIR=${BREW_DIR/\/bin\/brew/} @@ -166,7 +166,7 @@ Uninstall_php() } action=${1} -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_php else Uninstall_php diff --git a/plugins/php/versions/85/install.sh b/plugins/php/versions/85/install.sh index 5aa79f982..54f173618 100755 --- a/plugins/php/versions/85/install.sh +++ b/plugins/php/versions/85/install.sh @@ -168,7 +168,7 @@ Uninstall_php() } action=${1} -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_php else Uninstall_php diff --git a/plugins/php/versions/all_mac.sh b/plugins/php/versions/all_mac.sh index cc6997335..55786488c 100644 --- a/plugins/php/versions/all_mac.sh +++ b/plugins/php/versions/all_mac.sh @@ -21,7 +21,7 @@ ROOT_DIR=$(cd "$(dirname "$0")"; pwd) # cd $DIR && /bin/bash install.sh install $PHP_VER # for ii in $cmd_ext # do -# if [ "install.sh" == "$ii" ];then +# if [ "install.sh" = "$ii" ];then # echo '' > /tmp/t.log # else # cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER diff --git a/plugins/php/versions/all_test.sh b/plugins/php/versions/all_test.sh index d9ebd21b9..3c2fb63b1 100644 --- a/plugins/php/versions/all_test.sh +++ b/plugins/php/versions/all_test.sh @@ -19,7 +19,7 @@ ROOT_DIR=$(cd "$(dirname "$0")"; pwd) # cd $DIR && /bin/bash install.sh install $PHP_VER # for ii in $cmd_ext # do -# if [ "install.sh" == "$ii" ];then +# if [ "install.sh" = "$ii" ];then # echo '' > /tmp/t.log # else # cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER diff --git a/plugins/php/versions/common.sh b/plugins/php/versions/common.sh index e6d15c554..677ffce28 100644 --- a/plugins/php/versions/common.sh +++ b/plugins/php/versions/common.sh @@ -22,7 +22,7 @@ FILE=${curPath}/${version}/${extName}.sh FILE_COMMON=${curPath}/common/${extName}.sh -if [ "$action" == 'install' ];then +if [ "$action" = 'install' ];then if [ -f $FILE ];then cd ${curPath}/${version} && bash ${extName}.sh install ${version} @@ -34,7 +34,7 @@ if [ "$action" == 'install' ];then fi -if [ "$action" == 'uninstall' ];then +if [ "$action" = 'uninstall' ];then if [ -f $FILE ];then cd ${curPath}/${version} && bash ${extName}.sh uninstall ${version} elif [ -f $FILE_COMMON ];then diff --git a/plugins/php/versions/common/apcu.sh b/plugins/php/versions/common/apcu.sh index a15080730..316d7aace 100755 --- a/plugins/php/versions/common/apcu.sh +++ b/plugins/php/versions/common/apcu.sh @@ -21,7 +21,7 @@ version=$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 -if [ "$sysName" == "Darwin" ];then +if [ "$sysName" = "Darwin" ];then BAK='_bak' else BAK='' @@ -93,8 +93,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/versions/common/bcmath.sh b/plugins/php/versions/common/bcmath.sh index 341ad1d4c..a0d8c90c2 100755 --- a/plugins/php/versions/common/bcmath.sh +++ b/plugins/php/versions/common/bcmath.sh @@ -113,8 +113,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/versions/common/exif.sh b/plugins/php/versions/common/exif.sh index eb12a21aa..b39849fdd 100755 --- a/plugins/php/versions/common/exif.sh +++ b/plugins/php/versions/common/exif.sh @@ -19,7 +19,7 @@ version=$2 LIBNAME=exif LIBV=0 -if [ "$version" == "53" ];then +if [ "$version" = "53" ];then echo "i wont support it" exit fi @@ -34,7 +34,7 @@ NON_ZTS_FILENAME=`ls $serverPath/php/${version}/${LIB_PATH_NAME}/extensions | gr extFile=$serverPath/php/${version}/${LIB_PATH_NAME}/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so sysName=`uname` -if [ "$sysName" == "Darwin" ];then +if [ "$sysName" = "Darwin" ];then BAK='_bak' else BAK='' @@ -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/versions/common/fileinfo.sh b/plugins/php/versions/common/fileinfo.sh index e0a481d17..ffd3d8b86 100755 --- a/plugins/php/versions/common/fileinfo.sh +++ b/plugins/php/versions/common/fileinfo.sh @@ -17,7 +17,7 @@ version=$2 LIBNAME=fileinfo LIBV=0 -if [ "$version" == "53" ];then +if [ "$version" = "53" ];then echo "i wont support it" exit fi @@ -31,7 +31,7 @@ NON_ZTS_FILENAME=`ls $serverPath/php/${version}/${LIB_PATH_NAME}/extensions | gr extFile=$serverPath/php/${version}/${LIB_PATH_NAME}/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so sysName=`uname` -if [ "$sysName" == "Darwin" ];then +if [ "$sysName" = "Darwin" ];then BAK='_bak' else BAK='' @@ -135,8 +135,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/versions/common/iconv.sh b/plugins/php/versions/common/iconv.sh index f0fd1ecd4..a6af836b1 100755 --- a/plugins/php/versions/common/iconv.sh +++ b/plugins/php/versions/common/iconv.sh @@ -30,7 +30,7 @@ NON_ZTS_FILENAME=`ls $serverPath/php/${version}/${LIB_PATH_NAME}/extensions | gr extFile=$serverPath/php/${version}/${LIB_PATH_NAME}/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so sysName=`uname` -if [ "$sysName" == "Darwin" ];then +if [ "$sysName" = "Darwin" ];then BAK='_bak' else BAK='' @@ -109,8 +109,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/versions/common/intl.sh b/plugins/php/versions/common/intl.sh index c3be5072d..d6086edde 100755 --- a/plugins/php/versions/common/intl.sh +++ b/plugins/php/versions/common/intl.sh @@ -148,8 +148,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/versions/common/mongo.sh b/plugins/php/versions/common/mongo.sh index 751852974..525c4b94c 100755 --- a/plugins/php/versions/common/mongo.sh +++ b/plugins/php/versions/common/mongo.sh @@ -48,7 +48,7 @@ Install_lib() if [ ! -f "$extFile" ];then OPTIONS='' - if [ $sysName == 'Darwin' ]; then + if [ $sysName = 'Darwin' ]; then LIB_DEPEND_DIR=`brew info openssl | grep /usr/local/Cellar/openssl | cut -d \ -f 1 | awk 'END {print}'` OPTIONS="--with-openssl-dir=${LIB_DEPEND_DIR}" fi diff --git a/plugins/php/versions/common/opcache.sh b/plugins/php/versions/common/opcache.sh index 9e7e26ad9..57e3f8660 100755 --- a/plugins/php/versions/common/opcache.sh +++ b/plugins/php/versions/common/opcache.sh @@ -50,7 +50,7 @@ Install_lib() echo "" >> $serverPath/php/$version/etc/php.ini echo "[opcache]" >> $serverPath/php/$version/etc/php.ini - if [ "$version" == "85" ];then + if [ "$version" = "85" ];then echo "Force enable opcache in PHP 8.5+" else echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini @@ -84,8 +84,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/versions/common/pgsql.sh b/plugins/php/versions/common/pgsql.sh index 86cd59f34..706db7f62 100755 --- a/plugins/php/versions/common/pgsql.sh +++ b/plugins/php/versions/common/pgsql.sh @@ -27,7 +27,7 @@ NON_ZTS_FILENAME=`ls $serverPath/php/${version}/${LIB_PATH_NAME}/extensions | gr extFile=$serverPath/php/${version}/${LIB_PATH_NAME}/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so sysName=`uname` -if [ "$sysName" == "Darwin" ];then +if [ "$sysName" = "Darwin" ];then BAK='_bak' else BAK='' @@ -103,8 +103,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/versions/common/solr.sh b/plugins/php/versions/common/solr.sh index fa06b7603..4d9dbfc98 100755 --- a/plugins/php/versions/common/solr.sh +++ b/plugins/php/versions/common/solr.sh @@ -63,7 +63,7 @@ Install_lib() OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu" fi - if [ $sysName == 'Darwin' ]; then + if [ $sysName = 'Darwin' ]; then BREW_DIR=`which brew` BREW_DIR=${BREW_DIR/\/bin\/brew/} LIB_DEPEND_DIR=`brew info curl | grep ${BREW_DIR}/Cellar/curl | cut -d \ -f 1 | awk 'END {print}'`