From d9bd3c252c99b0b0896b66ea7a3998e6680e0f99 Mon Sep 17 00:00:00 2001 From: chaos-zhu Date: Fri, 16 Aug 2024 13:42:56 +0800 Subject: [PATCH] =?UTF-8?q?:wrench:=20clien=20shell=20=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/easynode-client-install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/client/easynode-client-install.sh b/client/easynode-client-install.sh index 9a217ee..0d86c46 100644 --- a/client/easynode-client-install.sh +++ b/client/easynode-client-install.sh @@ -8,9 +8,10 @@ fi SERVER_NAME=easynode-client FILE_PATH=/root/local/easynode-client SERVICE_PATH=/etc/systemd/system -SERVER_VERSION=v1.0 +CLIENT_VERSION=client-2024-08-16 # 目前监控客户端版本发布需手动更改为最新版本号 +SERVER_PROXY="${SERVER_PROXY:-https://mirror.ghproxy.com/}" # 末尾需加斜杠,使用外部环境变量或默认值 -echo "***********************开始安装 easynode-client_${SERVER_VERSION}***********************" +echo "***********************开始安装EasyNode监控客户端端,当前版本号: ${CLIENT_VERSION}***********************" systemctl status ${SERVER_NAME} > /dev/null 2>&1 if [ $? != 4 ] @@ -42,15 +43,15 @@ echo "***********************创建文件PATH***********************" mkdir -p ${FILE_PATH} echo "***********************下载开始***********************" -DOWNLOAD_SERVICE_URL="https://mirror.ghproxy.com/https://github.com/chaos-zhu/easynode/releases/download/v2.1.7/easynode-client.service" +DOWNLOAD_SERVICE_URL="${SERVER_PROXY}https://github.com/chaos-zhu/easynode/releases/download/${CLIENT_VERSION}/easynode-client.service" ARCH=$(uname -m) -echo "***********************系统架构: ${$ARCH}***********************" +echo "***********************系统架构: $ARCH***********************" if [ "$ARCH" = "x86_64" ] ; then - DOWNLOAD_FILE_URL="https://mirror.ghproxy.com/https://github.com/chaos-zhu/easynode/releases/download/v2.1.7/easynode-client-x64" + DOWNLOAD_FILE_URL="${SERVER_PROXY}https://github.com/chaos-zhu/easynode/releases/download/${CLIENT_VERSION }/easynode-client-x64" elif [ "$ARCH" = "aarch64" ] ; then - DOWNLOAD_FILE_URL="https://mirror.ghproxy.com/https://github.com/chaos-zhu/easynode/releases/download/v2.1.7/easynode-client-arm64" + DOWNLOAD_FILE_URL="${SERVER_PROXY}https://github.com/chaos-zhu/easynode/releases/download/${CLIENT_VERSION }/easynode-client-arm64" else echo "不支持的架构:$ARCH. 只支持x86_64和aarch64,其他架构请自行构建" exit 1