From 3ac79e49515392a805fc565a10dc77bfe5f0c17f Mon Sep 17 00:00:00 2001 From: grimm <1769111741@qq.com> Date: Wed, 5 Jun 2024 16:49:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=9C=8D=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=87=8D=E5=90=AF=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/main.sh b/main.sh index a3129ad..1536074 100644 --- a/main.sh +++ b/main.sh @@ -103,6 +103,7 @@ restart_server() { restart_script="bash /data/jieling/server/bin/start.sh core1" ;; "coreRestart") + server_name=core restart_script="bash /data/jieling/server/bin/reboot_all.sh" ;; *) @@ -128,7 +129,16 @@ game_send_package() { if [[ $reboot -eq 1 ]]; then if is_valid_ip "$channel"; then unzip_package $channel $package $source_tar $destination_dir - restart_server "coreRestart" "$channel" + read -r -p "更新完毕,是否需要重启(Y/N): " input + case $input in + [yY][eE][sS]|[yY]) + restart_server "coreRestart" "$channel" + ;; + *) + echo "over..." + exit 0 + ;; + esac else for ip in $(awk '{print $2}' "txt/$channel") do