From 960be4f7c041924ce2a1d8ee5bc8c56fb8363526 Mon Sep 17 00:00:00 2001 From: "PC-202302260912\\Administrator" <1769111741@qq.com> Date: Mon, 7 Aug 2023 16:53:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.sh b/main.sh index 2dc121a..7f65187 100644 --- a/main.sh +++ b/main.sh @@ -111,12 +111,12 @@ game_send_package() { restart_server "core" "$channel" fi else - while read -r ip; do + awk '{print $2}' "txt/$channel" | while read -r ip; do unzip_package $ip $package $source_tar $destination_dir if [[ $reboot -eq 1 ]]; then restart_server "core" "$ip" fi - done < "txt/$channel" + done fi } @@ -130,9 +130,9 @@ gm_send_package() { if is_valid_ip "$channel"; then unzip_package $channel $package $source_tar $destination_dir else - while read -r ip; do + awk '{print $2}' "txt/$channel" | while read -r ip; do unzip_package $ip $package $source_tar $destination_dir - done < "txt/$channel" + done fi } @@ -269,10 +269,10 @@ gm_option() { restart_server "admin" "$ip" elif [ "$action" = "batch_reboot" ]; then local path="/data/update/script/txt/gm_ip.txt" - while read -r ip; do + awk '{print $2}' "${path}" | while read -r ip; do echo -e "开始更新gm $ip" restart_server "admin" "$ip" - done < ${path} + done fi }