diff --git a/restart.sh b/restart.sh index 83c84a1..d60dc39 100755 --- a/restart.sh +++ b/restart.sh @@ -11,7 +11,7 @@ do f= "./log-"${cur_dateTime}".txt" #mv log.txt $f mv rxlog.txt "./rxlog-"${cur_dateTime}".txt" - nohup python3 -u ./server.py >>$f 2>&1 & + nohup python3 -u ./server.py >>${f} 2>&1 & else #echo ${cur_dateTime}" ---- ./server.py program is running" fi diff --git a/run_tt_server.sh b/run_tt_server.sh index 1747f67..2882902 100755 --- a/run_tt_server.sh +++ b/run_tt_server.sh @@ -16,10 +16,10 @@ 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 /root/tt/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 & +nohup python3 -u ./server.py >>${f} 2>&1 & nohup ./restart.sh & echo "Done."