From aa317ee2f5dec50b126a1132a8cb184e85a1c54d Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 11 Sep 2026 20:47:27 +0800 Subject: [PATCH] update --- plugins/cloudreve/install.sh | 2 +- plugins/data_query/install.sh | 2 +- plugins/dztasks/install.sh | 2 +- plugins/php-yum/versions/common/sg11.sh | 10 +++--- plugins/postgresql/install.sh | 6 ++-- plugins/postgresql/versions/14/install.sh | 2 +- plugins/postgresql/versions/16/install.sh | 2 +- plugins/postgresql/versions/17/install.sh | 2 +- plugins/postgresql/versions/18/install.sh | 2 +- plugins/prometheus/install.sh | 6 ++-- plugins/rsyncd/install.sh | 8 ++--- plugins/simpleping/install.sh | 6 ++-- plugins/sphinx/install.sh | 42 +++++++++++------------ plugins/supervisor/install.sh | 6 ++-- plugins/swap/install.sh | 4 +-- plugins/sys-opt/install.sh | 2 +- plugins/task_manager/install.sh | 2 +- plugins/tgbot/install.sh | 2 +- plugins/valkey/install.sh | 2 +- plugins/varnish/install.sh | 2 +- plugins/webstats/install.old.sh | 6 ++-- plugins/webstats/install.sh | 4 +-- 22 files changed, 61 insertions(+), 61 deletions(-) diff --git a/plugins/cloudreve/install.sh b/plugins/cloudreve/install.sh index 490f8235e..c7b6c837e 100755 --- a/plugins/cloudreve/install.sh +++ b/plugins/cloudreve/install.sh @@ -25,7 +25,7 @@ elif [ "$sysArch" = "aarch64" ]; then fi ALIST_NAME=linux -if [ "$sysName" == "Darwin" ];then +if [ "$sysName" = "Darwin" ];then ALIST_NAME=darwin fi diff --git a/plugins/data_query/install.sh b/plugins/data_query/install.sh index 7a45a82a2..2f200bb49 100755 --- a/plugins/data_query/install.sh +++ b/plugins/data_query/install.sh @@ -26,7 +26,7 @@ Uninstall_App() } action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_App else Uninstall_App diff --git a/plugins/dztasks/install.sh b/plugins/dztasks/install.sh index 89e2c2e01..5d77e72c0 100755 --- a/plugins/dztasks/install.sh +++ b/plugins/dztasks/install.sh @@ -78,7 +78,7 @@ Uninstall_App() } action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_App else Uninstall_App diff --git a/plugins/php-yum/versions/common/sg11.sh b/plugins/php-yum/versions/common/sg11.sh index afe03f329..8d749cff1 100644 --- a/plugins/php-yum/versions/common/sg11.sh +++ b/plugins/php-yum/versions/common/sg11.sh @@ -31,7 +31,7 @@ cfgDir=/etc/opt/remi/php${version}/php.d extIni=${cfgDir}/10-${LIBNAME}.ini -if [ "$sysName" == "Darwin" ];then +if [ "$sysName" = "Darwin" ];then BAK='_bak' else BAK='' @@ -41,7 +41,7 @@ Install_lib() { bash ${rootPath}/scripts/getos.sh OSNAME=`cat ${rootPath}/data/osname.pl` - if [ "$OSNAME" == 'macos' ];then + if [ "$OSNAME" = 'macos' ];then VERSION_ID=none else VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` @@ -51,7 +51,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 @@ -115,8 +115,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/postgresql/install.sh b/plugins/postgresql/install.sh index 45da63395..8be04da1d 100755 --- a/plugins/postgresql/install.sh +++ b/plugins/postgresql/install.sh @@ -21,7 +21,7 @@ if [ -f ${rootPath}/bin/activate ];then fi -if [ "${2}" == "" ];then +if [ "${2}" = "" ];then echo '缺少安装脚本...' exit 0 fi @@ -31,7 +31,7 @@ if [ ! -d $curPath/versions/$VERSION ];then exit 0 fi -if [ "${action}" == "uninstall" ];then +if [ "${action}" = "uninstall" ];then if [ -f /usr/lib/systemd/system/postgresql.service ] || [ -f /lib/systemd/system/postgresql.service ];then systemctl stop postgresql systemctl disable postgresql @@ -43,7 +43,7 @@ fi sh -x $curPath/versions/$VERSION/install.sh $1 -if [ "${action}" == "install" ] && [ -d $serverPath/postgresql ];then +if [ "${action}" = "install" ] && [ -d $serverPath/postgresql ];then #初始化 cd ${rootPath} && python3 ${rootPath}/plugins/postgresql/index.py start ${type} cd ${rootPath} && python3 ${rootPath}/plugins/postgresql/index.py initd_install ${type} diff --git a/plugins/postgresql/versions/14/install.sh b/plugins/postgresql/versions/14/install.sh index 54aa854eb..28848d9c9 100755 --- a/plugins/postgresql/versions/14/install.sh +++ b/plugins/postgresql/versions/14/install.sh @@ -121,7 +121,7 @@ Uninstall_App() } action=$1 -if [ "${1}" == "install" ];then +if [ "${1}" = "install" ];then Install_App else Uninstall_App diff --git a/plugins/postgresql/versions/16/install.sh b/plugins/postgresql/versions/16/install.sh index fea8b3986..cd4991d58 100755 --- a/plugins/postgresql/versions/16/install.sh +++ b/plugins/postgresql/versions/16/install.sh @@ -121,7 +121,7 @@ Uninstall_App() } action=$1 -if [ "${1}" == "install" ];then +if [ "${1}" = "install" ];then Install_App else Uninstall_App diff --git a/plugins/postgresql/versions/17/install.sh b/plugins/postgresql/versions/17/install.sh index 422434e64..6da7e606a 100755 --- a/plugins/postgresql/versions/17/install.sh +++ b/plugins/postgresql/versions/17/install.sh @@ -121,7 +121,7 @@ Uninstall_App() } action=$1 -if [ "${1}" == "install" ];then +if [ "${1}" = "install" ];then Install_App else Uninstall_App diff --git a/plugins/postgresql/versions/18/install.sh b/plugins/postgresql/versions/18/install.sh index e0d484cc1..a07b03c83 100755 --- a/plugins/postgresql/versions/18/install.sh +++ b/plugins/postgresql/versions/18/install.sh @@ -121,7 +121,7 @@ Uninstall_App() } action=$1 -if [ "${1}" == "install" ];then +if [ "${1}" = "install" ];then Install_App else Uninstall_App diff --git a/plugins/prometheus/install.sh b/plugins/prometheus/install.sh index 152111a1d..d402c9036 100755 --- a/plugins/prometheus/install.sh +++ b/plugins/prometheus/install.sh @@ -18,11 +18,11 @@ sysName=`uname` echo "use system: ${sysName}" OSNAME=`bash ${rootPath}/scripts/getos.sh` -if [ "" == "$OSNAME" ];then +if [ "" = "$OSNAME" ];then OSNAME=`cat ${rootPath}/data/osname.pl` fi -if [ "macos" == "$OSNAME" ];then +if [ "macos" = "$OSNAME" ];then echo "不支持Macox" exit fi @@ -78,7 +78,7 @@ Uninstall_App() } action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_App else Uninstall_App diff --git a/plugins/rsyncd/install.sh b/plugins/rsyncd/install.sh index 5c555bc56..921c24936 100755 --- a/plugins/rsyncd/install.sh +++ b/plugins/rsyncd/install.sh @@ -35,13 +35,13 @@ Install_rsyncd() echo '正在安装脚本文件...' - if [ "$OSNAME" == "debian" ] || [ "$OSNAME" == "ubuntu" ];then + if [ "$OSNAME" = "debian" ] || [ "$OSNAME" = "ubuntu" ];then apt install -y rsync apt install -y lsyncd - elif [[ "$OSNAME" == "arch" ]]; then + elif [[ "$OSNAME" = "arch" ]]; then echo y | pacman -Sy rsync echo y | pacman -Sy lsyncd - elif [[ "$OSNAME" == "macos" ]]; then + elif [[ "$OSNAME" = "macos" ]]; then # brew install rsync # brew install lsyncd echo "ok" @@ -87,7 +87,7 @@ Uninstall_rsyncd() } action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_rsyncd else Uninstall_rsyncd diff --git a/plugins/simpleping/install.sh b/plugins/simpleping/install.sh index 7a39c14de..91f9248fd 100755 --- a/plugins/simpleping/install.sh +++ b/plugins/simpleping/install.sh @@ -21,13 +21,13 @@ Install_App() mkdir -p $serverPath/source/simpleping name=linux - if [ "$sysName" == "Darwin" ];then + if [ "$sysName" = "Darwin" ];then name="darwin" else sysctl -w net.ipv4.ping_group_range="0 2147483647" fi - if [ "$ARCH" == "x86_64" ];then + if [ "$ARCH" = "x86_64" ];then ARCH="amd64" fi @@ -78,7 +78,7 @@ Uninstall_App() } action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_App else Uninstall_App diff --git a/plugins/sphinx/install.sh b/plugins/sphinx/install.sh index f7615d8fc..14ae70189 100755 --- a/plugins/sphinx/install.sh +++ b/plugins/sphinx/install.sh @@ -43,47 +43,47 @@ VERSION=$2 # echo $VERSION -if [ "$VERSION" == "3.1.1" ];then +if [ "$VERSION" = "3.1.1" ];then if [ "$sysArch" != "x86_64" ];then echo "no support" exit 1 fi VERSION_NUM=${VERSION}-612d99f -elif [ "$VERSION" == "3.2.1" ]; then +elif [ "$VERSION" = "3.2.1" ]; then if [ "$sysArch" != "x86_64" ];then echo "no support" exit 1 fi VERSION_NUM=${VERSION}-f152e0b -elif [ "$VERSION" == "3.3.1" ]; then +elif [ "$VERSION" = "3.3.1" ]; then if [ "$sysArch" != "x86_64" ];then echo "no support" exit 1 fi VERSION_NUM=${VERSION}-b72d67b -elif [ "$VERSION" == "3.4.1" ]; then +elif [ "$VERSION" = "3.4.1" ]; then if [ "$sysArch" != "x86_64" ];then echo "no support" exit 1 fi VERSION_NUM=${VERSION}-efbcc65 -elif [ "$VERSION" == "3.5.1" ]; then +elif [ "$VERSION" = "3.5.1" ]; then if [ "$sysArch" != "x86_64" ];then echo "no support" exit 1 fi VERSION_NUM=${VERSION}-82c60cb -elif [ "$VERSION" == "3.6.1" ]; then +elif [ "$VERSION" = "3.6.1" ]; then if [ "$sysArch" != "x86_64" ];then echo "no support" exit 1 fi VERSION_NUM=${VERSION}-c9dbeda -elif [ "$VERSION" == "3.7.1" ]; then +elif [ "$VERSION" = "3.7.1" ]; then VERSION_NUM=${VERSION}-da9f8a4 -elif [ "$VERSION" == "3.8.1" ]; then +elif [ "$VERSION" = "3.8.1" ]; then VERSION_NUM=${VERSION}-d25e0bb -elif [ "$VERSION" == "3.9.1" ]; then +elif [ "$VERSION" = "3.9.1" ]; then VERSION_NUM=${VERSION}-141d2ea fi @@ -98,33 +98,33 @@ Install_sphinx() mkdir -p $SPHINX_DIR SPH_NAME=amd64 - if [ "$sysArch" == "arm64" ];then + if [ "$sysArch" = "arm64" ];then SPH_NAME=amd64 - elif [ "$sysArch" == "x86_64" ]; then + elif [ "$sysArch" = "x86_64" ]; then SPH_NAME=amd64 - elif [ "$sysArch" == "aarch64" ]; then + elif [ "$sysArch" = "aarch64" ]; then SPH_NAME=aarch64 fi - if [ "$sysName" == "Darwin" ] && [ "$VERSION" == "3.7.1" ];then + if [ "$sysName" = "Darwin" ] && [ "$VERSION" = "3.7.1" ];then SPH_NAME=aarch64 fi SPH_SYSNAME=linux - if [ $sysName == 'Darwin' ]; then + if [ $sysName = 'Darwin' ]; then SPH_SYSNAME=darwin - elif [ "$sysName" == "aarch64" ]; then + elif [ "$sysName" = "aarch64" ]; then SPH_NAME=aarch64 - elif [ "$sysName" == "freebsd" ]; then + elif [ "$sysName" = "freebsd" ]; then SPH_NAME=freebsd fi - if [ "$SPH_SYSNAME" == "linux" ];then + if [ "$SPH_SYSNAME" = "linux" ];then glibc_ver=`ldd --version | grep libc | awk -F ')' '{print $2}'|awk '{gsub(/^\s+|\s+$/, "");print}'` - if [ "$VERSION" == "3.7.1" ] && [ `echo "2.29 > $glibc_ver " | bc` -eq 1 ];then + if [ "$VERSION" = "3.7.1" ] && [ `echo "2.29 > $glibc_ver " | bc` -eq 1 ];then SPH_NAME=${SPH_NAME}-glibc2.17 fi - if [ "$VERSION" == "3.6.1" ] && [ `echo "2.29 > $glibc_ver " | bc` -eq 1 ];then + if [ "$VERSION" = "3.6.1" ] && [ `echo "2.29 > $glibc_ver " | bc` -eq 1 ];then SPH_NAME=${SPH_NAME}-glibc2.17 fi fi @@ -141,7 +141,7 @@ Install_sphinx() cd ${SPHINX_DIR} && tar -zxvf ${FILE_TGZ} - if [ "$?" == "0" ];then + if [ "$?" = "0" ];then mkdir -p $serverPath/sphinx/bin cp -rf ${SPHINX_DIR}/sphinx-${VERSION}/* $serverPath/sphinx/bin fi @@ -190,7 +190,7 @@ Uninstall_sphinx() } action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_sphinx else Uninstall_sphinx diff --git a/plugins/supervisor/install.sh b/plugins/supervisor/install.sh index a042435c1..40cb56db6 100755 --- a/plugins/supervisor/install.sh +++ b/plugins/supervisor/install.sh @@ -34,9 +34,9 @@ Install_app() mkdir -p $serverPath/supervisor/run echo 'supervisor install...' - if [ "centos" == "$OSNAME" ] || [ "fedora" == "$OSNAME" ];then + if [ "centos" = "$OSNAME" ] || [ "fedora" = "$OSNAME" ];then pip install supervisor - elif [ "ubuntu" == "$OSNAME" ] || [ "debian" == "$OSNAME" ] ;then + elif [ "ubuntu" = "$OSNAME" ] || [ "debian" = "$OSNAME" ] ;then pip install supervisor else pip install supervisor @@ -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/swap/install.sh b/plugins/swap/install.sh index 1f698fd13..3d122ae5d 100755 --- a/plugins/swap/install.sh +++ b/plugins/swap/install.sh @@ -23,7 +23,7 @@ Install_swap() mkdir -p $serverPath/swap echo "${VERSION}" > $serverPath/swap/version.pl - if [ "$sysName" == "Darwin" ];then + if [ "$sysName" = "Darwin" ];then pass else dd if=/dev/zero of=$serverPath/swap/swapfile bs=1M count=1024 @@ -61,7 +61,7 @@ Uninstall_swap() } action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_swap else Uninstall_swap diff --git a/plugins/sys-opt/install.sh b/plugins/sys-opt/install.sh index 03e7c82ff..345ac5896 100755 --- a/plugins/sys-opt/install.sh +++ b/plugins/sys-opt/install.sh @@ -24,7 +24,7 @@ Uninstall_sysopt() } action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_sysopt else Uninstall_sysopt diff --git a/plugins/task_manager/install.sh b/plugins/task_manager/install.sh index c80994a45..304a5d901 100755 --- a/plugins/task_manager/install.sh +++ b/plugins/task_manager/install.sh @@ -47,7 +47,7 @@ Uninstall_App() } action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_App else Uninstall_App diff --git a/plugins/tgbot/install.sh b/plugins/tgbot/install.sh index 595f4d2d7..76b85d8b2 100755 --- a/plugins/tgbot/install.sh +++ b/plugins/tgbot/install.sh @@ -49,7 +49,7 @@ Uninstall_App() } action=$1 -if [ "${1}" == 'install' ];then +if [ "${1}" = 'install' ];then Install_App else Uninstall_App diff --git a/plugins/valkey/install.sh b/plugins/valkey/install.sh index 6a8c5bc9f..07beca474 100755 --- a/plugins/valkey/install.sh +++ b/plugins/valkey/install.sh @@ -36,7 +36,7 @@ Install_App() cd $VALKEY_DIR && tar -zxvf ${FILE_TGZ} CMD_MAKE=`which gmake` - if [ "$?" == "0" ];then + if [ "$?" = "0" ];then cd valkey-${VERSION} && gmake PREFIX=$serverPath/valkey install else cd valkey-${VERSION} && make PREFIX=$serverPath/valkey install diff --git a/plugins/varnish/install.sh b/plugins/varnish/install.sh index 13efb1982..0b5873609 100755 --- a/plugins/varnish/install.sh +++ b/plugins/varnish/install.sh @@ -28,7 +28,7 @@ Install_varnish() apt install varnish -y elif [[ "$OSNAME" = "arch" ]]; then echo y | pacman -Sy varnish - elif [ "${OSNAME}" == "opensuse" ];then + elif [ "${OSNAME}" = "opensuse" ];then zypper install -y varnish else echo "I won't support it" diff --git a/plugins/webstats/install.old.sh b/plugins/webstats/install.old.sh index 7a411a9e3..606c3c055 100755 --- a/plugins/webstats/install.old.sh +++ b/plugins/webstats/install.old.sh @@ -18,7 +18,7 @@ sys_os=`uname` HTTP_PREFIX="https://" LOCAL_ADDR=common cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"") -if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then +if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then LOCAL_ADDR=cn HTTP_PREFIX="https://" fi @@ -29,7 +29,7 @@ if [ "$LOCAL_ADDR" != "common" ];then fi -if [ "$sys_os" == "Darwin" ];then +if [ "$sys_os" = "Darwin" ];then BAK='_bak' else BAK='' @@ -120,7 +120,7 @@ Install_App() # 缓存数据 GEO_VERSION=$(get_latest_release "P3TERX/GeoLite.mmdb") if [ ! -f $serverPath/source/webstats/GeoLite2-City.mmdb ];then - if [ "$LOCAL_ADDR" == "cn" ];then + if [ "$LOCAL_ADDR" = "cn" ];then wget --no-check-certificate -O $serverPath/source/webstats/GeoLite2-City.mmdb https://dl.midoks.icu/soft/webstats/GeoLite2-City.mmdb else wget --no-check-certificate -O $serverPath/source/webstats/GeoLite2-City.mmdb https://github.com/P3TERX/GeoLite.mmdb/releases/download/${GEO_VERSION}/GeoLite2-City.mmdb diff --git a/plugins/webstats/install.sh b/plugins/webstats/install.sh index b88b1d7fb..82abc6bff 100755 --- a/plugins/webstats/install.sh +++ b/plugins/webstats/install.sh @@ -84,7 +84,7 @@ Install_App() export PATH=$PATH:$serverPath/webstats/luarocks/bin if [ ! -f $serverPath/webstats/lua/lsqlite3.so ];then - if [ "${sys_os}" == "Darwin" ];then + if [ "${sys_os}" = "Darwin" ];then cd $serverPath/source/webstats/lsqlite3_v096 # SQLITE_DIR=/usr/local/Cellar/sqlite/3.36.0 BREW_DIR=`which brew` @@ -119,7 +119,7 @@ Install_App() # 缓存数据 GEO_VERSION=$(get_latest_release "P3TERX/GeoLite.mmdb") if [ ! -s $serverPath/source/webstats/GeoLite2-City.mmdb ];then - if [ "$LOCAL_ADDR" == "cn" ];then + if [ "$LOCAL_ADDR" = "cn" ];then wget --no-check-certificate -O $serverPath/source/webstats/GeoLite2-City.mmdb https://dl.midoks.icu/soft/webstats/GeoLite2-City.mmdb else wget --no-check-certificate -O $serverPath/source/webstats/GeoLite2-City.mmdb https://github.com/P3TERX/GeoLite.mmdb/releases/download/${GEO_VERSION}/GeoLite2-City.mmdb