去掉启动时重定义>>
This commit is contained in:
parent
1e2b50cbdb
commit
d0f6d22824
@ -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
|
||||
|
@ -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."
|
||||
|
Loading…
Reference in New Issue
Block a user