From 6a6de154ba58ccd1a9feffc779f5af54e01c07d6 Mon Sep 17 00:00:00 2001 From: smeb y <48400087+a3165458@users.noreply.github.com> Date: Sat, 27 Apr 2024 18:30:51 +0800 Subject: [PATCH] Update pingpong.sh --- pingpong.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pingpong.sh b/pingpong.sh index 882907c..3b09c9d 100644 --- a/pingpong.sh +++ b/pingpong.sh @@ -40,17 +40,26 @@ else fi #获取运行文件 -read -p "请输入你的key device id:" your_device_id -export keyid=$your_device_id +read -p "请输入你的key device id: " your_device_id + +keyid="$your_device_id" + +# 下载PINGPONG程序 wget -O PINGPONG https://pingpong-build.s3.ap-southeast-1.amazonaws.com/linux/latest/PINGPONG -screen -dmS pingpong bash -c "chmod +x ./PINGPONG && ./PINGPONG --key $keyid" + +if [ -f "./PINGPONG" ]; then + chmod +x ./PINGPONG + screen -dmS pingpong bash -c "./PINGPONG --key \"$keyid\"" +else + echo "下载PINGPONG失败,请检查网络连接或URL是否正确。" +fi echo "节点已经启动,请使用screen -r pingpong 查看日志或使用脚本功能2" } function check_service_status() { - docker logs -f --tail 20 pingpong + screen -r pingpong }