From d0f6d228245046724f0371bbef49dbe54c9b3992 Mon Sep 17 00:00:00 2001 From: "CSSC-WORK\\murmur" Date: Sun, 7 Jan 2024 10:48:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=90=AF=E5=8A=A8=E6=97=B6?= =?UTF-8?q?=E9=87=8D=E5=AE=9A=E4=B9=89>>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- restart.sh | 9 +++++---- run_tt_server.sh | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/restart.sh b/restart.sh index 35ed322..786d1fa 100755 --- a/restart.sh +++ b/restart.sh @@ -6,13 +6,14 @@ while true; do cur_dateTime=$(date +%Y-%m-%d_%H-%M-%s) if [ $monitor -eq 0 ]; then echo $cur_dateTime" --- ./server.py program is not running, restart now" - cd ~/tt/tt-tcp + # cd ~/tt/tt-tcp #if= "./log-"$cur_dateTime".txt" - f="./log-"${cur_dateTime}".txt" - mv "./rxlog.txt" "./rxlog-"${cur_dateTime}".txt" + # f="./log-"${cur_dateTime}".txt" + mv "./rxlog.txt" "rxlog/rxlog-"${cur_dateTime}".txt" #cd /root/tt/tt-tcp #mv rxlog.txt "./rxlog-"$cur_dateTime".txt" - nohup python3 -u ./server.py >>$f 2>&1 & + # nohup python3 -u ./server.py >>$f 2>&1 & + nohup python3 -u ./server.py & fi sleep 5 done diff --git a/run_tt_server.sh b/run_tt_server.sh index 38f1fa9..18d3df9 100755 --- a/run_tt_server.sh +++ b/run_tt_server.sh @@ -16,11 +16,11 @@ echo "Now run new service." cur_dateTime=$(date +%Y-%m-%d_%H-%M) #cur_dateTime=$(date +%Y-%m-%d_%H-%m-%s) echo ${cur_dateTime} -cd ~/tt/tt-tcp +# cd ~/tt-tcp #mv log.txt "./log-"${cur_dateTime}".txt" -f="./log-"${cur_dateTime}".txt" -mv rxlog.txt "./rxlog-"${cur_dateTime}".txt" -nohup python3 -u ./server.py >>${f} 2>&1 & +# f="./log-"${cur_dateTime}".txt" +mv rxlog.txt "rxlog/rxlog-"${cur_dateTime}".txt" +nohup python3 -u ./server.py & #nohup ./restart.sh & nohup ./restart.sh >> reboot.log & echo "Done."