From 82e2ee2aead5676f54cf1fd20df66c12d0c0864f Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 22 Jul 2024 23:05:33 +0800 Subject: [PATCH] Update ubuntu.sh --- plugins/zabbix/versions/6.0/ubuntu.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/zabbix/versions/6.0/ubuntu.sh b/plugins/zabbix/versions/6.0/ubuntu.sh index 16458b4b7..a65f647e7 100644 --- a/plugins/zabbix/versions/6.0/ubuntu.sh +++ b/plugins/zabbix/versions/6.0/ubuntu.sh @@ -10,19 +10,24 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl - +SYS_ARCH=`arch` SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` +ubuntu_suffix= +if [ "$SYS_ARCH" == "aarch64" ];then + ubuntu_suffix="-arm64" +fi + # 检查是否通 # zabbix_get -s 127.0.0.1 -k agent.ping Install_App() { mkdir -p $serverPath/source/zabbix - ZABBIX_NAME=zabbix-release_7.0-2+ubuntu${SYS_VERSION_ID}_all.deb - echo "wget -O $serverPath/source/zabbix/${ZABBIX_NAME} https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/${ZABBIX_NAME}" + ZABBIX_NAME=zabbix-release_6.0-5+ubuntu${SYS_VERSION_ID}_all.deb + echo "wget -O $serverPath/source/zabbix/${ZABBIX_NAME} https://repo.zabbix.com/zabbix/6.0/ubuntu${ubuntu_suffix}/pool/main/z/zabbix-release/${ZABBIX_NAME}" if [ ! -f $serverPath/source/zabbix/${ZABBIX_NAME} ];then - wget -O $serverPath/source/zabbix/${ZABBIX_NAME} https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/${ZABBIX_NAME} + wget -O $serverPath/source/zabbix/${ZABBIX_NAME} https://repo.zabbix.com/zabbix/6.0/ubuntu${ubuntu_suffix}/pool/main/z/zabbix-release/${ZABBIX_NAME} fi # apt-get -f install