Commit 6583cee7 authored by kalvin's avatar kalvin

修改log判断逻辑

parent dadaf0ab
...@@ -37,7 +37,7 @@ count=0 ...@@ -37,7 +37,7 @@ count=0
log_exist=0 log_exist=0
log_path="/home/quant_group/logs" log_path="/home/quant_group/logs"
until [[ $count -eq 120 ]] || [[ $log_exist -eq 1 ]] until [[ $count -eq 60 ]] || [[ $log_exist -eq 1 ]]
do do
let count+=1 let count+=1
echo "count is $count" echo "count is $count"
...@@ -45,13 +45,15 @@ do ...@@ -45,13 +45,15 @@ do
if find "$log_path" -mindepth 1 -print -quit | grep -q .; then if find "$log_path" -mindepth 1 -print -quit | grep -q .; then
echo "log is exist!" echo "log is exist!"
log_exist=1 log_exist=1
else
touch ./logs/error.log
echo "Log is not exist or java server start error." >> ./logs/error.log
fi fi
sleep 1 sleep 1
done done
if [[ $count -eq 60 ]]
touch ./logs/error.log
echo "Log is not exist or java server start error." >> ./logs/error.log
fi
echo "cd /home/qg-xterm/;git pull;cd -" echo "cd /home/qg-xterm/;git pull;cd -"
cd /home/qg-xterm/;git pull;cd - cd /home/qg-xterm/;git pull;cd -
...@@ -59,7 +61,7 @@ echo "node /home/qg-xterm/demo/app.js" ...@@ -59,7 +61,7 @@ echo "node /home/qg-xterm/demo/app.js"
nohup node /home/qg-xterm/demo/app.js & nohup node /home/qg-xterm/demo/app.js &
echo "frontail ./logs/*log -n 500 -d " echo "frontail ./logs/*log -n 500 -d "
frontail ./logs/*log -n 500 frontail ./logs/*log -n 500 -d
# echo "tail -f ./logs/*log" echo "tail -f ./logs/*log"
# tail -f ./logs/*log tail -f ./logs/*log
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment