Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejun committed Dec 31, 2024
1 parent 1d7c0b9 commit 14ae13f
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions revive.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
#!/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}
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
Expand Down

0 comments on commit 14ae13f

Please sign in to comment.