main
PC-202302260912\Administrator 2023-08-07 16:53:15 +08:00
parent 4d8da0041b
commit 960be4f7c0
1 changed files with 6 additions and 6 deletions

12
main.sh
View File

@ -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
}