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."