Commit 6583cee7 authored by kalvin's avatar kalvin

修改log判断逻辑

parent dadaf0ab
......@@ -37,7 +37,7 @@ count=0
log_exist=0
log_path="/home/quant_group/logs"
until [[ $count -eq 120 ]] || [[ $log_exist -eq 1 ]]
until [[ $count -eq 60 ]] || [[ $log_exist -eq 1 ]]
do
let count+=1
echo "count is $count"
......@@ -45,13 +45,15 @@ do
if find "$log_path" -mindepth 1 -print -quit | grep -q .; then
echo "log is exist!"
log_exist=1
else
touch ./logs/error.log
echo "Log is not exist or java server start error." >> ./logs/error.log
fi
sleep 1
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 -"
cd /home/qg-xterm/;git pull;cd -
......@@ -59,7 +61,7 @@ echo "node /home/qg-xterm/demo/app.js"
nohup node /home/qg-xterm/demo/app.js &
echo "frontail ./logs/*log -n 500 -d "
frontail ./logs/*log -n 500
frontail ./logs/*log -n 500 -d
# echo "tail -f ./logs/*log"
# tail -f ./logs/*log
\ No newline at end of file
echo "tail -f ./logs/*log"
tail -f ./logs/*log
\ 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