|
|
@ -218,7 +218,7 @@ else |
|
|
|
second_part=$(printf "%02d\n" `echo $MASTER_VER | awk -F'.' '{print $2}'`) |
|
|
|
second_part=$(printf "%02d\n" `echo $MASTER_VER | awk -F'.' '{print $2}'`) |
|
|
|
third_part=$(printf "%02d\n" `echo $MASTER_VER | awk -F'.' '{print $3}'`) |
|
|
|
third_part=$(printf "%02d\n" `echo $MASTER_VER | awk -F'.' '{print $3}'`) |
|
|
|
version_num="$first_part$second_part$third_part" |
|
|
|
version_num="$first_part$second_part$third_part" |
|
|
|
agent_ver=`(curl -s -m 5 "https://github.com/LoveesYe/cdnflydadao/web/upgrades?version_num=$version_num" || curl -s -m 5 "https://github.com/LoveesYe/cdnflydadao/web/upgrades?version_num=$version_num") | grep -Po '"agent_ver":"\d+"' | grep -Po "\d+" || true` |
|
|
|
agent_ver=`(curl -s -m 5 "https://github.com/LoveesYe/cdnflydadao/raw/main/web/upgrades?version_num=$version_num" || curl -s -m 5 "https://github.com/LoveesYe/cdnflydadao/raw/main/web/upgrades?version_num=$version_num") | grep -Po '"agent_ver":"\d+"' | grep -Po "\d+" || true` |
|
|
|
if [[ "$agent_ver" == "" ]]; then |
|
|
|
if [[ "$agent_ver" == "" ]]; then |
|
|
|
echo "无法获取agent版本" |
|
|
|
echo "无法获取agent版本" |
|
|
|
exit 1 |
|
|
|
exit 1 |
|
|
@ -236,7 +236,7 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
cd /opt |
|
|
|
cd /opt |
|
|
|
|
|
|
|
|
|
|
|
download "https://github.com/LoveesYe/cdnflydadao/agent/$tar_gz_name" "https://github.com/LoveesYe/cdnflydadao/agent/$tar_gz_name" "$tar_gz_name" |
|
|
|
download "https://github.com/LoveesYe/cdnflydadao/raw/main/agent/$tar_gz_name" "https://github.com/LoveesYe/cdnflydadao/raw/main/agent/$tar_gz_name" "$tar_gz_name" |
|
|
|
|
|
|
|
|
|
|
|
rm -rf $dir_name |
|
|
|
rm -rf $dir_name |
|
|
|
tar xf $tar_gz_name |
|
|
|
tar xf $tar_gz_name |
|
|
|