From 14ae13f222c4db6fbe90426a4370302e54741130 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 31 Dec 2024 18:10:37 +0800 Subject: [PATCH] . --- revive.sh | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/revive.sh b/revive.sh index 7dad70dd..4469c67c 100755 --- a/revive.sh +++ b/revive.sh @@ -1,17 +1,5 @@ #!/bin/bash -#HOSTS_JSON='{ -#"info": [ -#{ -# "host": "s2.serv00.com", -# "username": "xloong", -# "port": 22, -# "password": "abc123" -#} -#] -#}' -#echo "host info:$HOSTS_JSON" -# 使用 jq 提取 JSON 数组,并将其加载为 Bash 数组 AUTOUPDATE=${AUTOUPDATE:-Y} SENDTYPE=${SENDTYPE:-null} TELEGRAM_TOKEN=${TELEGRAM_TOKEN:-null} @@ -19,6 +7,7 @@ TELEGRAM_USERID=${TELEGRAM_USERID:-null} WXSENDKEY=${WXSENDKEY:-null} BUTTON_URL=${BUTTON_URL:-null} +# 使用 jq 提取 JSON 数组,并将其加载为 Bash 数组 hosts_info=($(echo "${HOSTS_JSON}" | jq -c ".info[]")) for info in "${hosts_info[@]}"; do